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