186 if (origin == null) {
187 logger.trace(
"No origin header ignoring");
192 if (
logger.isDebugEnabled()) {
193 logger.debugv(
"Invalid CORS request: origin {0} not in allowed origins {1}", origin, Arrays.toString(
allowedOrigins.toArray()));
230 logger.debug(
"Added CORS headers to response");
static final String ACCESS_CONTROL_ALLOW_ORIGIN
Definition: Cors.java:50
Cors auth()
Definition: Cors.java:96
static final String ACCESS_CONTROL_EXPOSE_HEADERS
Definition: Cors.java:53
static final long DEFAULT_MAX_AGE
Definition: Cors.java:43
static final String ACCESS_CONTROL_MAX_AGE
Definition: Cors.java:55
static final String DEFAULT_ALLOW_HEADERS
Definition: Cors.java:45
Set< String > exposedHeaders
Definition: Cors.java:64
static final String DEFAULT_ALLOW_METHODS
Definition: Cors.java:44
static final String ACCESS_CONTROL_ALLOW_HEADERS
Definition: Cors.java:52
static final String AUTHORIZATION_HEADER
Definition: Cors.java:48
static final String ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD
Definition: Cors.java:57
Cors preflight()
Definition: Cors.java:91
Set< String > allowedOrigins
Definition: Cors.java:62
Set< String > allowedMethods
Definition: Cors.java:63
HttpRequest request
Definition: Cors.java:60
static final String ACCESS_CONTROL_ALLOW_METHODS
Definition: Cors.java:51
static final String ORIGIN_HEADER
Definition: Cors.java:47
static final Logger logger
Definition: Cors.java:41
static final String ACCESS_CONTROL_ALLOW_CREDENTIALS
Definition: Cors.java:54