public final class HttpsRedirectWebFilter
extends java.lang.Object
implements org.springframework.web.server.WebFilter
ServerWebExchangeMatcher to narrow which requests get redirected.
Can also be configured for custom ports using PortMapper.| Constructor and Description |
|---|
HttpsRedirectWebFilter() |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<java.lang.Void> |
filter(org.springframework.web.server.ServerWebExchange exchange,
org.springframework.web.server.WebFilterChain chain) |
void |
setPortMapper(PortMapper portMapper)
Use this
PortMapper for mapping custom ports |
void |
setRequiresHttpsRedirectMatcher(ServerWebExchangeMatcher requiresHttpsRedirectMatcher)
Use this
ServerWebExchangeMatcher to narrow which requests are redirected to HTTPS. |
public reactor.core.publisher.Mono<java.lang.Void> filter(org.springframework.web.server.ServerWebExchange exchange,
org.springframework.web.server.WebFilterChain chain)
filter in interface org.springframework.web.server.WebFilterpublic void setPortMapper(PortMapper portMapper)
PortMapper for mapping custom portsportMapper - the PortMapper to usepublic void setRequiresHttpsRedirectMatcher(ServerWebExchangeMatcher requiresHttpsRedirectMatcher)
ServerWebExchangeMatcher to narrow which requests are redirected to HTTPS.
The filter already first checks for HTTPS in the uri scheme, so it is not necessary
to include that check in this matcher.requiresHttpsRedirectMatcher - the ServerWebExchangeMatcher to use