addFilterAfter
Adds a WebFilter after specific position.
Example:
@Configuration
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
addFilterAfter(CustomWebFilter(), SecurityWebFiltersOrder.SECURITY_CONTEXT_SERVER_WEB_EXCHANGE)
}
}
}Content copied to clipboard
Parameters
webFilter
the WebFilter to add
order
the place after which to insert the WebFilter