motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.77k stars 319 forks source link

Two endpoins with same listenpath but different hosts #408

Open crdil opened 4 years ago

crdil commented 4 years ago

I wonder if it should be possible to add two endpoints which have the same listen path "/" but listen on different hosts? for example the first endpoint listens on "example.org" and the second on "example1.org". As of now it doesn't seem possible?

Leonardo-Ferreira commented 3 years ago

on #478 I proposed that this is a bug. You should not be able to add duplicated apis or endpoints for that matter. The current behavior is to override top->bottom on the declaration. If you wish you have the same path on 2 backends, the closest you can get is to set them as backend and round-robin on them