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
{{ message }}
Repository navigation
fix: drop the dead server.use-forward-headers property #192
application.properties sets server.use-forward-headers=true ("to make spring boot work behind a reverse proxy"). Spring Boot 2.2 replaced that property with server.forward-headers-strategy, and Spring Boot 2.7 already marked it as removed, so it has done nothing for several releases. Springfox (until 2.0.0) read X-Forwarded-Host itself, so the API description still named the public host. springdoc (since #185) takes the server URL from the request. Spring Boot honours X-Forwarded-* headers only in Kubernetes, where it picks the native strategy by itself. Elsewhere (e.g. Docker behind nginx), /v3/api-docs names the internal URL, and the Swagger UI's "Try it out" fails. The 2.0.0 upgrade notes tell such deployments to set SERVER_FORWARD_HEADERS_STRATEGY (#191).
Expected result
The dead property and its comment are removed from application.properties, or replaced with server.forward-headers-strategy=native. If it is replaced, the docs say which proxies are trusted (Tomcat's internal-address default) and how to change that.
A test checks that the description's server URL follows X-Forwarded-Host/-Proto with the chosen setting.
docs/deployment.md (or configuration.md) and the upgrade notes of that release say what changed.
Activity