Class ForwardedHeaderFilter
- java.lang.Object
- org.springframework.web.server.adapter.ForwardedHeaderTransformer
- org.springframework.web.filter.reactive.ForwardedHeaderFilter
- All Implemented Interfaces:
Function<ServerHttpRequest,ServerHttpRequest>
,WebFilter
@Deprecated public class ForwardedHeaderFilter extends ForwardedHeaderTransformer implements WebFilter
Deprecated.as of 5.1 this filter is deprecated in favor of usingForwardedHeaderTransformer
which can be declared as a bean with the name "forwardedHeaderTransformer" or registered explicitly inWebHttpHandlerBuilder
.Extract values from "Forwarded" and "X-Forwarded-*" headers to override the request URI (i.e.HttpRequest.getURI()
) so it reflects the client-originated protocol and address.Alternatively if
removeOnly
is set to "true", then "Forwarded" and "X-Forwarded-*" headers are only removed and not used.- Since:
- 5.0
- Author:
- Arjen Poutsma, Rossen Stoyanchev
- See Also:
- https://tools.ietf.org/html/rfc7239
Constructor Summary
Constructors Constructor Description ForwardedHeaderFilter()
Deprecated.
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description reactor.core.publisher.Mono<Void>
filter(ServerWebExchange exchange, WebFilterChain chain)
Deprecated.Process the Web request and (optionally) delegate to the nextWebFilter
through the givenWebFilterChain
.Methods inherited from class org.springframework.web.server.adapter.ForwardedHeaderTransformer
apply, hasForwardedHeaders, isRemoveOnly, setRemoveOnly
Constructor Detail
ForwardedHeaderFilter
public ForwardedHeaderFilter()
Deprecated.
Method Detail
filter
public reactor.core.publisher.Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain)
Deprecated.Description copied from interface:WebFilter
Process the Web request and (optionally) delegate to the nextWebFilter
through the givenWebFilterChain
.