org.springframework.web.reactive.config

## Class CorsRegistry

- java.lang.Object
- - org.springframework.web.reactive.config.CorsRegistry

-     public class CorsRegistry
      extends Object

  Assists with the registration of global, URL pattern based `CorsConfiguration` mappings.
  Since:
    5.0
  Author:
    Sebastien Deleuze, Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CorsRegistry()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CorsRegistration` | `addMapping(String pathPattern)` Enable cross-origin request handling for the specified path pattern.
    `protected Map<String,CorsConfiguration>` | `getCorsConfigurations()` Return the registered `CorsConfiguration` objects, keyed by path pattern.

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

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

- - ### Constructor Detail

    - #### CorsRegistry

          public CorsRegistry()

  - ### Method Detail

    - #### addMapping

          public CorsRegistration addMapping(String pathPattern)

      Enable cross-origin request handling for the specified path pattern.

      Exact path mapping URIs (such as `"/admin"`) are supported as well as Ant-style path patterns (such as `"/admin/**"`).

      By default, the `CorsConfiguration` for this mapping is initialized with default values as described in `CorsConfiguration.applyPermitDefaultValues()`.

    - #### getCorsConfigurations

          protected Map<String,CorsConfiguration> getCorsConfigurations()

      Return the registered `CorsConfiguration` objects, keyed by path pattern.