| Modifier and Type | Class and Description |
|---|---|
| public static class | CorsConfig.
Deprecated
Use
CorsConfigBuilder instead.
|
| public static class | CorsConfig.
Deprecated
Removed without alternatives.
|
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final Set | |
| private final Set | |
| private final boolean | |
| private final boolean | |
| private final boolean | |
| private final boolean | |
| private final Set | |
| private final long | |
| private final Set | |
| private final Map | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public Set | Returns: Set<String> of strings that represent the allowed Request Headers.Returns the allowed set of Request Headers. |
| public Set | |
| public Set | Returns: List<String> a list of the headers to expose.Returns a set of headers to be exposed to calling clients. |
| private static <T> T | |
| public boolean | Returns: boolean true if any origin is allowed.Determines whether a wildcard origin, '*', is supported. |
| public boolean | Returns: true if support for CORS is enabled, false otherwise.Determines if support for CORS is enabled. |
| public boolean | Returns: true if cookies are supported.Determines if cookies are supported for CORS requests. |
| public boolean | Returns: true if a 'null' origin should be supported.Web browsers may set the 'Origin' request header to 'null' if a resource is loaded from the local file system. |
| public boolean | Returns: true if private network access should be allowed.Web browsers may set the 'Access-Control-Request-Private-Network' request header if a resource is loaded from a local network. |
| public boolean | Returns: true if a CORS request should short-circuit upon receiving an invalid Origin header.Determines whether a CORS request should be rejected if it's invalid before being further processing. |
| public boolean | |
| public long | Returns: long the time in seconds that a preflight request may be cached.Gets the maxAge setting. |
| public String | Returns: the value that will be used for the CORS response header 'Access-Control-Allow-Origin'Returns the allowed origin. |
| public Set | |
| public HttpHeaders | Returns: HttpHeaders the HTTP response headers to be added.Returns HTTP response headers that should be added to a CORS preflight response. |
| public String | |
| public static CorsConfig. | |
| public static CorsConfig. | |
| public static CorsConfig. | withOrigins(final String... origins)
Deprecated
Use
CorsConfigBuilder#forOrigins(String. instead.
|
| allowCredentials | back to summary |
|---|---|
| private final boolean allowCredentials | |
| allowedRequestHeaders | back to summary |
|---|---|
| private final Set<String> allowedRequestHeaders | |
| allowedRequestMethods | back to summary |
|---|---|
| private final Set<HttpMethod> allowedRequestMethods | |
| allowNullOrigin | back to summary |
|---|---|
| private final boolean allowNullOrigin | |
| allowPrivateNetwork | back to summary |
|---|---|
| private final boolean allowPrivateNetwork | |
| anyOrigin | back to summary |
|---|---|
| private final boolean anyOrigin | |
| enabled | back to summary |
|---|---|
| private final boolean enabled | |
| exposeHeaders | back to summary |
|---|---|
| private final Set<String> exposeHeaders | |
| maxAge | back to summary |
|---|---|
| private final long maxAge | |
| origins | back to summary |
|---|---|
| private final Set<String> origins | |
| preflightHeaders | back to summary |
|---|---|
| private final Map<CharSequence, Callable<?>> preflightHeaders | |
| shortCircuit | back to summary |
|---|---|
| private final boolean shortCircuit | |
| CorsConfig | back to summary |
|---|---|
| pack-priv CorsConfig(final CorsConfigBuilder builder) | |
| allowedRequestHeaders | back to summary |
|---|---|
| public Set Returns the allowed set of Request Headers. The header names returned from this method will be used to set the CORS 'Access-Control-Allow-Headers' response header. | |
| allowedRequestMethods | back to summary |
|---|---|
| public Set Returns the allowed set of Request Methods. The Http methods that should be returned in the CORS 'Access-Control-Request-Method' response header.
| |
| exposedHeaders | back to summary |
|---|---|
| public Set Returns a set of headers to be exposed to calling clients. During a simple CORS request only certain response headers are made available by the browser, for example using:
xhr.getResponseHeader("Content-Type");
The headers that are available by default are:
| |
| getValue | back to summary |
|---|---|
| private static <T> T getValue(final Callable<T> callable) | |
| isAnyOriginSupported | back to summary |
|---|---|
| public boolean isAnyOriginSupported() Determines whether a wildcard origin, '*', is supported.
| |
| isCorsSupportEnabled | back to summary |
|---|---|
| public boolean isCorsSupportEnabled() Determines if support for CORS is enabled.
| |
| isCredentialsAllowed | back to summary |
|---|---|
| public boolean isCredentialsAllowed() Determines if cookies are supported for CORS requests. By default cookies are not included in CORS requests but if isCredentialsAllowed returns true cookies will be added to CORS requests. Setting this value to true will set the CORS 'Access-Control-Allow-Credentials' response header to true. Please note that cookie support needs to be enabled on the client side as well. The client needs to opt-in to send cookies by calling: xhr.withCredentials = true;The default value for 'withCredentials' is false in which case no cookies are sent. Setting this to true will included cookies in cross origin requests.
| |
| isNullOriginAllowed | back to summary |
|---|---|
| public boolean isNullOriginAllowed() Web browsers may set the 'Origin' request header to 'null' if a resource is loaded from the local file system. If isNullOriginAllowed is true then the server will response with the wildcard for the CORS response header 'Access-Control-Allow-Origin'.
| |
| isPrivateNetworkAllowed | back to summary |
|---|---|
| public boolean isPrivateNetworkAllowed() Web browsers may set the 'Access-Control-Request-Private-Network' request header if a resource is loaded from a local network. By default direct access to private network endpoints from public websites is not allowed. If isPrivateNetworkAllowed is true the server will response with the CORS response header 'Access-Control-Request-Private-Network'.
| |
| isShortCircuit | back to summary |
|---|---|
| public boolean isShortCircuit() Determines whether a CORS request should be rejected if it's invalid before being further processing. CORS headers are set after a request is processed. This may not always be desired and this setting will check that the Origin is valid and if it is not valid no further processing will take place, and an error will be returned to the calling client.
| |
| isShortCurcuit | back to summary |
|---|---|
| public boolean isShortCurcuit()
Deprecated Use
| |
| maxAge | back to summary |
|---|---|
| public long maxAge() Gets the maxAge setting. When making a preflight request the client has to perform two request with can be inefficient. This setting will set the CORS 'Access-Control-Max-Age' response header and enables the caching of the preflight response for the specified time. During this time no preflight request will be made.
| |
| origin | back to summary |
|---|---|
| public String origin() Returns the allowed origin. This can either be a wildcard or an origin value.
| |
| origins | back to summary |
|---|---|
| public Set Returns the set of allowed origins. | |
| preflightResponseHeaders | back to summary |
|---|---|
| public HttpHeaders preflightResponseHeaders() Returns HTTP response headers that should be added to a CORS preflight response.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| withAnyOrigin | back to summary |
|---|---|
| public static CorsConfig. Deprecated Use
| |
| withOrigin | back to summary |
|---|---|
| public static CorsConfig. Deprecated Use
| |
| withOrigins | back to summary |
|---|---|
| public static CorsConfig. Deprecated Use
| |
Deprecated
Use CorsConfigBuilder instead.
| Modifier and Type | Field and Description |
|---|---|
| private final CorsConfigBuilder |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| builder | back to summary |
|---|---|
| private final CorsConfigBuilder builder | |
| Builder | back to summary |
|---|---|
| public Builder(final String... origins)
Deprecated Use
| |
| Builder | back to summary |
|---|---|
| public Builder()
Deprecated Use
| |
| allowCredentials | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| allowedRequestHeaders | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| allowedRequestMethods | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| allowNullOrigin | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| build | back to summary |
|---|---|
| public CorsConfig build()
Deprecated Use
| |
| disable | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| exposeHeaders | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| maxAge | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| noPreflightResponseHeaders | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| preflightResponseHeader | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
| preflightResponseHeader | back to summary |
|---|---|
| public <T> CorsConfig. Deprecated Use
| |
| preflightResponseHeader | back to summary |
|---|---|
| public <T> CorsConfig. Deprecated Use
| |
| shortCurcuit | back to summary |
|---|---|
| public CorsConfig. Deprecated Use
| |
Deprecated
Removed without alternatives.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Date | call()
Implements java. |
| DateValueGenerator | back to summary |
|---|---|
| public DateValueGenerator() | |
| call | back to summary |
|---|---|
| public Date call() throws Exception Implements java. Doc from java. Computes a result, or throws an exception if unable to do so. | |