Annotation Interface CrossOrigin
Support CORs configuration via annotation. For example, it will enable Micronaut developers only
to allow CORS for a few routes in their applications. Thus, having more secure
applications.
- Since:
- 3.9.0
-
Element Details
-
value
-
allowedOrigins
-
allowedOriginsRegex
-
allowedHeaders
-
exposedHeaders
String[] exposedHeaders- Returns:
- response headers that user-agent will allow client to access on actual response
- Default:
{}
-
allowedMethods
-
allowCredentials
boolean allowCredentials- Returns:
- whether the browser should send credentials
- Default:
true
-
allowPrivateNetwork
boolean allowPrivateNetwork- Returns:
- should the browser have access to the local network
- Since:
- 4.3.0
- Default:
true
-
maxAge
long maxAge- Returns:
- maximum age (in seconds) of the cache duration for preflight responses
- Default:
1800L
-