public class CORS extends Object
The class intercepts incoming HTTP requests and applies the CORS policy as specified by the configuration parameters. The actual CORS request is processed by this class.
Supported configuration parameters:
*
.
"GET, POST, HEAD, OPTIONS"
.
*
.
true
.
-1
(unspecified).
Modifier and Type | Field and Description |
---|---|
static String |
ACCESS_CONTROL_ALLOW_CREDENTIALS |
static String |
ACCESS_CONTROL_ALLOW_HEADERS |
static String |
ACCESS_CONTROL_ALLOW_METHODS |
static String |
ACCESS_CONTROL_ALLOW_ORIGIN |
static String |
ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD |
static String |
ACCESS_CONTROL_EXPOSE_HEADERS |
static String |
ACCESS_CONTROL_MAX_AGE |
static String |
ACCESS_CONTROL_REQUEST_HEADERS |
static String |
ACCESS_CONTROL_REQUEST_METHOD |
static String |
DEFAULT_ALLOW_METHODS |
static long |
DEFAULT_MAX_AGE |
static String |
HOST |
static String |
ORIGIN |
Constructor and Description |
---|
CORS() |
Modifier and Type | Method and Description |
---|---|
static void |
handleActualRequest(CORSConfiguration corsConfiguration,
HttpServletRequest request,
HttpServletResponse response) |
static void |
handlePreflightRequest(CORSConfiguration corsConfiguration,
HttpServletRequest request,
HttpServletResponse response) |
public static final String ORIGIN
public static final String HOST
public static final long DEFAULT_MAX_AGE
public static final String DEFAULT_ALLOW_METHODS
public static final String ACCESS_CONTROL_REQUEST_METHOD
public static final String ACCESS_CONTROL_REQUEST_HEADERS
public static final String ACCESS_CONTROL_ALLOW_ORIGIN
public static final String ACCESS_CONTROL_ALLOW_METHODS
public static final String ACCESS_CONTROL_ALLOW_HEADERS
public static final String ACCESS_CONTROL_EXPOSE_HEADERS
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS
public static final String ACCESS_CONTROL_MAX_AGE
public static final String ACCESS_CONTROL_ALLOW_ORIGIN_WILDCARD
public static void handleActualRequest(CORSConfiguration corsConfiguration, HttpServletRequest request, HttpServletResponse response)
public static void handlePreflightRequest(CORSConfiguration corsConfiguration, HttpServletRequest request, HttpServletResponse response)
Copyright © 2015. All rights reserved.