Package | Description |
---|---|
org.springframework.web.servlet.config.annotation |
Annotation-based setup for Spring MVC.
|
Modifier and Type | Method and Description |
---|---|
CorsRegistration |
CorsRegistry.addMapping(String pathPattern)
Enable cross-origin request handling for the specified path pattern.
|
CorsRegistration |
CorsRegistration.allowCredentials(boolean allowCredentials)
Whether the browser should send credentials, such as cookies along with
cross domain requests, to the annotated endpoint.
|
CorsRegistration |
CorsRegistration.allowedHeaders(String... headers)
Set the list of headers that a pre-flight request can list as allowed
for use during an actual request.
|
CorsRegistration |
CorsRegistration.allowedMethods(String... methods)
Set the HTTP methods to allow, e.g.
|
CorsRegistration |
CorsRegistration.allowedOriginPatterns(String... patterns)
Alternative to
allowedOrigins(String...) that supports more
flexible patterns for specifying the origins for which cross-origin
requests are allowed from a browser. |
CorsRegistration |
CorsRegistration.allowedOrigins(String... origins)
Set the origins for which cross-origin requests are allowed from a browser.
|
CorsRegistration |
CorsRegistration.combine(CorsConfiguration other)
Apply the given
CorsConfiguration to the one being configured via
CorsConfiguration.combine(CorsConfiguration) which in turn has been
initialized with CorsConfiguration.applyPermitDefaultValues() . |
CorsRegistration |
CorsRegistration.exposedHeaders(String... headers)
Set the list of response headers other than "simple" headers, i.e.
|
CorsRegistration |
CorsRegistration.maxAge(long maxAge)
Configure how long in seconds the response from a pre-flight request
can be cached by clients.
|