Allow choice between Forwarded and X-Forwarded headers

This commit introduces a constructor argument to select whether
to use the standard "Forwarded" header or the "X-Forwarded-*"
alternative headers. A separate property to control support for
X-Forwarded-Prefix.

Closes gh-37090
This commit is contained in:
rstoyanchev
2026-07-27 12:46:43 +03:00
parent ae4214aa95
commit 181a5d3403
12 changed files with 569 additions and 246 deletions
@@ -148,7 +148,7 @@ class RequestMappingIntegrationTests extends AbstractRequestMappingIntegrationTe
@Bean
public ForwardedHeaderTransformer forwardedHeaderTransformer() {
return new ForwardedHeaderTransformer();
return new ForwardedHeaderTransformer(true);
}
}