From 3872ec868bffe7d3f21fe44fb98b98373f40bcdd Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Fri, 27 Oct 2023 10:17:29 +0200 Subject: [PATCH] Mention ForwardedHeaderTransformer in the documentation Closes gh-37282 --- .../spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc index 29ab1852d38..e5855e7b8dc 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc @@ -454,8 +454,8 @@ There are also non-standard headers, like `X-Forwarded-Host`, `X-Forwarded-Port` If the proxy adds the commonly used `X-Forwarded-For` and `X-Forwarded-Proto` headers, setting `server.forward-headers-strategy` to `NATIVE` is enough to support those. With this option, the Web servers themselves natively support this feature; you can check their specific documentation to learn about specific behavior. -If this is not enough, Spring Framework provides a {spring-framework-docs}/web.html#filters-forwarded-headers[ForwardedHeaderFilter]. -You can register it as a servlet filter in your application by setting `server.forward-headers-strategy` is set to `FRAMEWORK`. +If this is not enough, Spring Framework provides a {spring-framework-docs}/web.html#filters-forwarded-headers[ForwardedHeaderFilter] for the servlet stack and a {spring-framework-docs}/web-reactive.html#webflux-forwarded-headers[ForwardedHeaderTransformer] for the reactive stack. +You can use them in your application by setting configprop:server.forward-headers-strategy[] to `FRAMEWORK`. TIP: If you are using Tomcat and terminating SSL at the proxy, configprop:server.tomcat.redirect-context-root[] should be set to `false`. This allows the `X-Forwarded-Proto` header to be honored before any redirects are performed.