You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing issues with the swagger-ui 'Try it out' button. The host configuration in the design.go contained the Host as "http://0.0.0.0/9090". As a result openapi.json also contains shows up host as "http://0.0.0.0/9090" and on trying the API, curl request is sent to "http://0.0.0.0/9090" for obvious reasons. Now the problem is that the API is hosted on a different server. On trying to hit the API from any other machine, the curl command fails.
I tried manually removing the Host from openapi.json and then things just work perfectly as the curl is sent to the same DNS which was used to open swagger-ui page.
Is there a way to disable writing "host" in openapi.json from design.go?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi ,
I am facing issues with the swagger-ui 'Try it out' button. The host configuration in the design.go contained the Host as "http://0.0.0.0/9090". As a result openapi.json also contains shows up host as "http://0.0.0.0/9090" and on trying the API, curl request is sent to "http://0.0.0.0/9090" for obvious reasons. Now the problem is that the API is hosted on a different server. On trying to hit the API from any other machine, the curl command fails.
I tried manually removing the Host from openapi.json and then things just work perfectly as the curl is sent to the same DNS which was used to open swagger-ui page.
Is there a way to disable writing "host" in openapi.json from design.go?
Beta Was this translation helpful? Give feedback.
All reactions