headers
Allows configuring response headers.
Example:
@Configuration
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun springWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http {
headers {
referrerPolicy {
policy = ReferrerPolicy.SAME_ORIGIN
}
frameOptions {
mode = Mode.DENY
}
}
}
}
}Content copied to clipboard
Parameters
headersConfiguration
custom configuration to be applied to the response headers