We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Describe the bug We are running a spring-boot application behind a load balancer that terminates HTTPS. When accessing https://my-application.url/swagger-ui.html it redirects to http://my-application.url/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config. This is caused by the fact that SwaggerWelcomeWebMvc#redirectToUi returns a String with redirect: prefix. This causes the tomcat to return an absolute URL, using HTTP as protocol instead of HTTPS, in the HTTP location header.
redirect:
To Reproduce Steps to reproduce the behavior:
springdoc-openapi-ui
springdoc-openapi-data-rest
Expected behavior The redirect respects the used protocol, in this case HTTPS. I guess a relative redirect could solve this problem.
Additional context As a workaround you can either access https://my-application.url/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config directly or set server.tomcat.use-relative-redirects=true in your application.properties
server.tomcat.use-relative-redirects=true
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
We are running a spring-boot application behind a load balancer that terminates HTTPS. When accessing https://my-application.url/swagger-ui.html it redirects to http://my-application.url/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config. This is caused by the fact that SwaggerWelcomeWebMvc#redirectToUi returns a String with
redirect:
prefix. This causes the tomcat to return an absolute URL, using HTTP as protocol instead of HTTPS, in the HTTP location header.
To Reproduce
Steps to reproduce the behavior:
springdoc-openapi-ui
,springdoc-openapi-data-rest
Expected behavior
The redirect respects the used protocol, in this case HTTPS. I guess a relative redirect could solve this problem.
Additional context
As a workaround you can either access https://my-application.url/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config directly or set
server.tomcat.use-relative-redirects=true
in your application.propertiesThe text was updated successfully, but these errors were encountered: