Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

X-Forwarded-Prefix can no longer be enabled with the NATIVE strategy on Reactor Netty

Closed Beginner friendly
#52,316 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@bclozel is already working on this.

Since Oct 22, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
java, spring-boot
Domain
api, backend

Research direction

Read NettyReactiveWebServerFactory and the change referenced as 66a093dbfa in #51031; trace how forwarded-header settings reach HttpServer.forwarded(...). Add the proposed server.netty.forwarded-headers.use-forwarded-prefix property with a default of false, then verify that native strategy honors X-Forwarded-Prefix when enabled and leaves it disabled by default.

Written by the indexing model from the issue text.

Description

status: waiting-for-triage

Spring Boot: 4.2.0-M2

With server.forward-headers-strategy=native, a WebFlux application on Reactor Netty ignores X-Forwarded-Prefix in 4.2.0-M2, and theres no configuration property to enable it.

NettyReactiveWebServerFactory now calls HttpServer.forwarded(useStandardHeader, useForwardedPrefix) with useForwardedPrefix hard-coded to false (66a093dbfa, #51031).

With X-Forwarded-Prefix: /api and no other configuration, ServerHttpRequest.getPath().contextPath() is:

Strategy 4.1.1 4.2.0-M2
native /api (empty)
framework /api (empty), can be enabled with spring.webflux.forwarded-headers.use-forwarded-prefix=true

Not honoring the prefix by default matches spring-projects/spring-framework#37072, which suggests enabling it with "a separate property". However, that property only exists for the framework strategy. With native, the only options are switching strategies or writing a NettyServerCustomizer. The change also isnt mentioned in the 4.2.0-M1 release notes, so applications behind a proxy that sends X-Forwarded-Prefix will silently generate links and redirects without the prefix after upgrading.

Would you consider adding server.netty.forwarded-headers.use-forwarded-prefix (defaulting to false, like the Framework one) and passing it to HttpServer.forwarded(...)? Id be happy to submit a PR.

Dominant language
Java
Stars
81.8k
Forks
44.7k
Avg merge
3d 14h
Merged PRs (30d)
60

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-projects/spring-boot

All issues in spring-projects/spring-boot

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.