Class ServerHttpSecurity.CorsSpec
- java.lang.Object
-
- org.springframework.security.config.web.server.ServerHttpSecurity.CorsSpec
-
- Enclosing class:
- ServerHttpSecurity
public final class ServerHttpSecurity.CorsSpec extends java.lang.Object
Configures CORS support within Spring Security. This ensures that theCorsWebFilter
is place in the correct order.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerHttpSecurity
and()
Allows method chaining to continue configuring theServerHttpSecurity
ServerHttpSecurity.CorsSpec
configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source)
Configures theCorsConfigurationSource
to be usedprotected void
configure(ServerHttpSecurity http)
ServerHttpSecurity
disable()
Disables CORS support within Spring Security.
-
-
-
Method Detail
-
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
public ServerHttpSecurity disable()
Disables CORS support within Spring Security.- Returns:
- the
ServerHttpSecurity
to continue configuring
-
and
public ServerHttpSecurity and()
Allows method chaining to continue configuring theServerHttpSecurity
- Returns:
- the
ServerHttpSecurity
to continue configuring
-
configure
protected void configure(ServerHttpSecurity http)
-
-