Annotation Type CORS
Marks endpoints that should have CORS headers associated with it. Inject a
CORSResponseDecorator to customize the response.
- Author:
- Tim Boudreau
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
boolean valueBy default, returns true. Set to false to turn OFF CORS handling in the case that you have it enabled globally.- Returns:
- Default:
- true
-
methods
Method[] methodsSet the methods cors responses are valid for. If unset or empty, the value will be derived from the registered paths in the application.- Returns:
- A set of methods
- Default:
- {}
-
headers
String[] headersThe added access control allowed headers.- Returns:
- A list of header names.
- Default:
- {}
-
origins
String[] originsThe set of origins cors responses apply to.- Returns:
- Origins
- Default:
- {}
-
maxAgeSeconds
int maxAgeSecondsThe maximum age in seconds for cors responses.- Returns:
- Default:
- 0
-