Package org.springframework.security.config.web.server

# Class ServerHttpSecurity.CorsSpec

java.lang.Object
org.springframework.security.config.web.server.ServerHttpSecurity.CorsSpec

Enclosing class:
  ServerHttpSecurity

public final class ServerHttpSecurity.CorsSpec extends Object
Configures CORS support within Spring Security. This ensures that the `CorsWebFilter` is place in the correct order.

## Method Summary

Modifier and Type
Method
Description
`ServerHttpSecurity`
`and()`
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0.
`ServerHttpSecurity.CorsSpec`
`configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source)`
Configures the `CorsConfigurationSource` to be used
`protected void`
`configure(ServerHttpSecurity http)`
`ServerHttpSecurity`
`disable()`
Disables CORS support within Spring Security.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### configurationSource

public ServerHttpSecurity.CorsSpec configurationSource(org.springframework.web.cors.reactive.CorsConfigurationSource source)
Configures the `CorsConfigurationSource` 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

@Deprecated(since="6.1", forRemoval=true) public ServerHttpSecurity and()
Deprecated, for removal: This API element is subject to removal in a future version.
For removal in 7.0. Use `ServerHttpSecurity.cors(Customizer)` or `cors(Customizer.withDefaults())` to stick with defaults. See the documentation for more details.
Allows method chaining to continue configuring the `ServerHttpSecurity`

Returns:
  the `ServerHttpSecurity` to continue configuring

### configure

protected void configure(ServerHttpSecurity http)