-
-
Notifications
You must be signed in to change notification settings - Fork 494
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
Reverse proxy context path aware support for manually provided files #1453
Labels
enhancement
New feature or request
Comments
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is your feature request related to a problem? Please describe.
springdoc.swagger-ui.url
is set to/openapi.json
I expect the path to be context path aware. Similar to how the normal api-docs is handled.Describe the solution you'd like
springdoc.swagger-ui.url
i expect it to handle being served behind a reverse proxy.(of course given that the reverse proxies sets the correct headers
X-Forwarded-Prefix
/ similar.)springdoc.swagger-ui.url
it is expected that such a url is handled in a context path aware manner.Describe alternatives you've considered
I've considered hacks around it, such as defining the static file with the prefix of the reverse proxy in it. But that means any local testing will not work.
Looking into the code I have considered changing the following method somehow as that is where the url is being modified. And from what I can see it might be possible to do something around
String swaggerUiUrl = swaggerUiConfig.getUrl();
line to handle it in a similar way as done inbuildApiDocUrl()
.AbstractSwaggerWelcome.java
Additional context
Also would be fine with any other possibilities such as a flag to make ``springdoc.swagger-ui.url` context aware or any suggestions!
The text was updated successfully, but these errors were encountered: