spring-framework / org.springframework.web.filter.reactive

Package org.springframework.web.filter.reactive

Types

ForwardedHeaderFilter

open class ForwardedHeaderFilter : WebFilter

Extract values from "Forwarded" and "X-Forwarded-*" headers in order to change and override ServerHttpRequest#getURI(). In effect the request URI will reflect the client-originated protocol and address.

Note: This filter can also be used in a removeOnly mode where "Forwarded" and "X-Forwarded-*" headers are only eliminated without being used.

HiddenHttpMethodFilter

open class HiddenHttpMethodFilter : WebFilter

Reactive WebFilter that converts posted method parameters into HTTP methods, retrievable via ServerHttpRequest#getMethod(). Since browsers currently only support GET and POST, a common technique is to use a normal POST with an additional hidden form field (_method) to pass the "real" HTTP method along. This filter reads that parameter and changes the ServerHttpRequest#getMethod() return value using ServerWebExchange#mutate().

The name of the request parameter defaults to _method, but can be adapted via the methodParamName property.