I suspect that swagger is using the HTTP Header "Host xxxxx.com" to return the swagger.json file.
I can't find anything on the doncumentation to avoid this behavior.
Context
Info: I've change url in the exemple, so you may find screenshot and text different
I've an application deployed on a container behind 2 reverse proxy (one in the cloud env and one on kubernetes).
My URL application deployment on the kubernetes reverse proxy is (for exemple) : test1.dsrauto.prj.kube.test.com
I would like to expose my application with this url : network-api-pprod.test.com (more easy to use)
So, on the second revers proxy (HA Proxy), I've configured to listen on network-api-pprod.test.com and send trafic to the other reverse proxy (the kube). But for it can work, I've to add an header into http-request, like this (don't look the format, I'm justing using api to configure HAProxy):
If you look the network inspection, my browser is trying to get all swagger resource with the correct url (network-api-pprod.test.com) but only the swagger.json is trying to get on the HTTP Header Host url (test1.dsrauto.prj.kube.test.com).
I suspect that swagger is using the HTTP Header "Host xxxxx.com" to return the swagger.json file. I can't find anything on the doncumentation to avoid this behavior.
Context
Info: I've change url in the exemple, so you may find screenshot and text different I've an application deployed on a container behind 2 reverse proxy (one in the cloud env and one on kubernetes). My URL application deployment on the kubernetes reverse proxy is (for exemple) :
test1.dsrauto.prj.kube.test.com
I would like to expose my application with this url :
network-api-pprod.test.com
(more easy to use) So, on the second revers proxy (HA Proxy), I've configured to listen onnetwork-api-pprod.test.com
and send trafic to the other reverse proxy (the kube). But for it can work, I've to add an header into http-request, like this (don't look the format, I'm justing using api to configure HAProxy):If you look the network inspection, my browser is trying to get all swagger resource with the correct url (
network-api-pprod.test.com
) but only theswagger.json
is trying to get on the HTTP Header Host url (test1.dsrauto.prj.kube.test.com
).Environment