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.ObjectConfigures CORS support within Spring Security. This ensures that theCorsWebFilteris place in the correct order.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerHttpSecurityand()Allows method chaining to continue configuring theServerHttpSecurityServerHttpSecurity.CorsSpecconfigurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source)Configures theCorsConfigurationSourceto be usedprotected voidconfigure(ServerHttpSecurity http)ServerHttpSecuritydisable()Disables CORS support within Spring Security.
-
-
-
Method Detail
-
configurationSource
public ServerHttpSecurity.CorsSpec configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source)
Configures theCorsConfigurationSourceto be used- Parameters:
source- the source to use- Returns:
- the
ServerHttpSecurity.CorsSpecfor additional configuration
-
disable
public ServerHttpSecurity disable()
Disables CORS support within Spring Security.- Returns:
- the
ServerHttpSecurityto continue configuring
-
and
public ServerHttpSecurity and()
Allows method chaining to continue configuring theServerHttpSecurity- Returns:
- the
ServerHttpSecurityto continue configuring
-
configure
protected void configure(ServerHttpSecurity http)
-
-