Class ServerHttpSecurity.CorsSpec
java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.CorsSpec
- Enclosing class:
- ServerHttpSecurity
Configures CORS support within Spring Security. This ensures that the
CorsWebFilter
is place in the correct order.-
Method Summary
Modifier and TypeMethodDescriptionand()
Allows method chaining to continue configuring theServerHttpSecurity
configurationSource
(org.springframework.web.cors.reactive.CorsConfigurationSource source) Configures theCorsConfigurationSource
to be usedprotected void
configure
(ServerHttpSecurity http) disable()
Disables CORS support within Spring Security.
-
Method Details
-
configurationSource
public ServerHttpSecurity.CorsSpec configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source) Configures theCorsConfigurationSource
to be used- Parameters:
source
- the source to use- Returns:
- the
ServerHttpSecurity.CorsSpec
for additional configuration
-
disable
Disables CORS support within Spring Security.- Returns:
- the
ServerHttpSecurity
to continue configuring
-
and
Allows method chaining to continue configuring theServerHttpSecurity
- Returns:
- the
ServerHttpSecurity
to continue configuring
-
configure
-