Skip to content

fix: drop the dead server.use-forward-headers property #192

Closed

Description

@uniqueg

Why

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

  1. added
    type: bug
    priority: low
    status: triage
    workload: hours
    status: in progress
    and removed
    status: triage
    on Nov 16, 2026
  2. self-assigned this
    on Nov 16, 2026
  3. removed
    status: in progress
    on Nov 16, 2026
  4. added this to the v2.0.0 milestone on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: lowtype: bugworkload: hours

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions