Class ForwardedHeaderUtils

java.lang.Object
org.springframework.web.util.ForwardedHeaderUtils

public abstract class ForwardedHeaderUtils extends Object
Utility class to assist with processing "Forwarded" and "X-Forwarded-*" headers.

Note: There are security considerations surrounding the use of forwarded headers. Those should not be used unless the application is behind a trusted proxy that inserts them and also explicitly removes any such headers coming from an external source.

In most cases, you should not use this class directly but rather rely on ForwardedHeaderFilter for Spring MVC or ForwardedHeaderTransformer in order to extract the information from the headers as early as possible and discard such headers. Underlying servers such as Tomcat, Jetty, and Reactor Netty also provide options to handle forwarded headers even earlier.

Since:
6.1
Author:
Rossen Stoyanchev