Enable/Disable routes based on host #928
-
Hey :) I’m having a hard time thinking about something. Cloud foundry has the concept of That said. My app should expose an api to just host some things like metrics for prometheus. So Is it somehow possible to host 1 endpoint with 2 different routers and choose them based on checking if that header exists? Or something like that? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Sure! You can write a middleware that checks the header and routes the request accordingly. |
Beta Was this translation helpful? Give feedback.
Sure! You can write a middleware that checks the header and routes the request accordingly.