securityMatcher
Allows configuring the ServerHttpSecurity to only be invoked when matching the provided ServerWebExchangeMatcher.
Example:
@Configuration
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
securityMatcher(PathPatternParserServerWebExchangeMatcher("/api/**"))
formLogin {
loginPage = "/log-in"
}
}
}
}Content copied to clipboard
Parameters
securityMatcher
a ServerWebExchangeMatcher used to determine whether this configuration should be invoked.