public class CorsRegistry extends Object
CorsConfiguration mappings.| Constructor and Description |
|---|
CorsRegistry() |
| 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. |
public CorsRegistration addMapping(String pathPattern)
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().
protected Map<String,CorsConfiguration> getCorsConfigurations()
CorsConfiguration objects,
keyed by path pattern.