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()Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0.configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source) Configures theCorsConfigurationSourceto be usedprotected voidconfigure(ServerHttpSecurity http) disable()Disables CORS support within Spring Security.
-
Method Details
-
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
Disables CORS support within Spring Security.- Returns:
- the
ServerHttpSecurityto continue configuring
-
and
Deprecated, for removal: This API element is subject to removal in a future version.For removal in 7.0. UseServerHttpSecurity.cors(Customizer)orcors(Customizer.withDefaults())to stick with defaults. See the documentation for more details.Allows method chaining to continue configuring theServerHttpSecurity- Returns:
- the
ServerHttpSecurityto continue configuring
-
configure
-