Document X-Forwarded-* Headers

Previously the documentation assumed that the readers knew how to use
the X-Forwarded-* headers. This commit documents details & examples
of how to use the X-Forwarded-* headers.

See gh-31491
This commit is contained in:
Rob Winch
2023-10-24 12:44:45 -05:00
committed by rstoyanchev
parent aa4f09d080
commit 03d286c4a1
5 changed files with 168 additions and 20 deletions

View File

@@ -69,6 +69,7 @@ import org.springframework.web.util.UrlPathHelper;
* @author Rob Winch
* @since 4.3
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
* @see <a href="https://docs.spring.io/spring-framework/reference/web/webmvc/filters.html#filters-forwarded-headers">Forwarded Headers</a>
*/
public class ForwardedHeaderFilter extends OncePerRequestFilter {

View File

@@ -55,6 +55,7 @@ import org.springframework.web.util.UriComponents;
* @author Rossen Stoyanchev
* @since 5.1
* @see <a href="https://tools.ietf.org/html/rfc7239">https://tools.ietf.org/html/rfc7239</a>
* @see <a href="https://docs.spring.io/spring-framework/reference/web/webflux/reactive-spring.html#webflux-forwarded-headers">Forwarded Headers</a>
*/
public class ForwardedHeaderTransformer implements Function<ServerHttpRequest, ServerHttpRequest> {