-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Unable to override the inferred server url when using springfox with a proxy #3531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Couple of things here
|
Also this is a duplicate of #3445 |
We are using the x-forward headers in the proxy. Our issue is not a base path issue, but a case of being unable to set the server url. We tried to override it using the servers method on the Docket class, but it seems that is bugged as per #3483. Our paths after the server url are just fine. |
Yeah, until the fix is out this is a work around |
The workaround worked, except I needed to use In Java:
|
I think just add this config could work
and you also could dynamically substitute servers url of
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had recent activity. Please re-open a new issue if this is still an issue. |
Uh oh!
There was an error while loading. Please reload this page.
What version of the library are you using? Is it the latest version? The latest released version is
Latest, 3.0.0
What kind of issue is this?
Question. Is this a question about how to do a certain thing?
I'm using springfox with an api that is behind a proxy. The proxy requires that the api have its address set to the local loopback address (127.0.0.1). Because of this, springfox is inferring the server url as https://127.0.0.1:443, instead of the actual url of the api. This causes requests sent from the swagger ui to fail, because they are being sent to local loopback instead of to the actual public api address. How can I override the inferred url to point the swagger ui at the correct address?
The text was updated successfully, but these errors were encountered: