Package | Description |
---|---|
io.netty.handler.codec.http.cors |
This package contains Cross Origin Resource Sharing (CORS) related classes.
|
Modifier and Type | Method and Description |
---|---|
CorsConfig.Builder |
CorsConfig.Builder.allowCredentials()
By default cookies are not included in CORS requests, but this method will enable cookies to
be added to CORS requests.
|
CorsConfig.Builder |
CorsConfig.Builder.allowedRequestHeaders(java.lang.String... headers)
Specifies the if headers that should be returned in the CORS 'Access-Control-Allow-Headers'
response header.
|
CorsConfig.Builder |
CorsConfig.Builder.allowedRequestMethods(HttpMethod... methods)
Specifies the allowed set of HTTP Request Methods that should be returned in the
CORS 'Access-Control-Request-Method' response header.
|
CorsConfig.Builder |
CorsConfig.Builder.allowNullOrigin()
Web browsers may set the 'Origin' request header to 'null' if a resource is loaded
from the local file system.
|
CorsConfig.Builder |
CorsConfig.Builder.disable()
Disables CORS support.
|
CorsConfig.Builder |
CorsConfig.Builder.exposeHeaders(java.lang.String... headers)
Specifies the headers to be exposed to calling clients.
|
CorsConfig.Builder |
CorsConfig.Builder.maxAge(long max)
When making a preflight request the client has to perform two request with can be inefficient.
|
CorsConfig.Builder |
CorsConfig.Builder.noPreflightResponseHeaders()
Specifies that no preflight response headers should be added to a preflight response.
|
<T> CorsConfig.Builder |
CorsConfig.Builder.preflightResponseHeader(java.lang.CharSequence name,
java.lang.Iterable<T> value)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsConfig.Builder |
CorsConfig.Builder.preflightResponseHeader(java.lang.CharSequence name,
java.lang.Object... values)
Returns HTTP response headers that should be added to a CORS preflight response.
|
<T> CorsConfig.Builder |
CorsConfig.Builder.preflightResponseHeader(java.lang.String name,
java.util.concurrent.Callable<T> valueGenerator)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsConfig.Builder |
CorsConfig.Builder.shortCurcuit()
Specifies that a CORS request should be rejected if it's invalid before being
further processing.
|
static CorsConfig.Builder |
CorsConfig.withAnyOrigin()
Creates a Builder instance with it's origin set to '*'.
|
static CorsConfig.Builder |
CorsConfig.withOrigin(java.lang.String origin)
Creates a
CorsConfig.Builder instance with the specified origin. |
static CorsConfig.Builder |
CorsConfig.withOrigins(java.lang.String... origins)
Creates a
CorsConfig.Builder instance with the specified origins. |
Copyright © 2008–2018 The Netty Project. All rights reserved.