程序包 | 说明 |
---|---|
io.netty.handler.codec.http.cors |
This package contains Cross Origin Resource Sharing (CORS) related classes.
|
限定符和类型 | 方法和说明 |
---|---|
CorsConfigBuilder |
CorsConfigBuilder.allowCredentials()
By default cookies are not included in CORS requests, but this method will enable cookies to
be added to CORS requests.
|
CorsConfigBuilder |
CorsConfigBuilder.allowedRequestHeaders(java.lang.CharSequence... headers)
Specifies the if headers that should be returned in the CORS 'Access-Control-Allow-Headers'
response header.
|
CorsConfigBuilder |
CorsConfigBuilder.allowedRequestHeaders(java.lang.String... headers)
Specifies the if headers that should be returned in the CORS 'Access-Control-Allow-Headers'
response header.
|
CorsConfigBuilder |
CorsConfigBuilder.allowedRequestMethods(HttpMethod... methods)
Specifies the allowed set of HTTP Request Methods that should be returned in the
CORS 'Access-Control-Request-Method' response header.
|
CorsConfigBuilder |
CorsConfigBuilder.allowNullOrigin()
Web browsers may set the 'Origin' request header to 'null' if a resource is loaded
from the local file system.
|
CorsConfigBuilder |
CorsConfigBuilder.allowPrivateNetwork()
Web browsers may set the 'Access-Control-Request-Private-Network' request header if a resource is loaded
from a local network.
|
CorsConfigBuilder |
CorsConfigBuilder.disable()
Disables CORS support.
|
CorsConfigBuilder |
CorsConfigBuilder.exposeHeaders(java.lang.CharSequence... headers)
Specifies the headers to be exposed to calling clients.
|
CorsConfigBuilder |
CorsConfigBuilder.exposeHeaders(java.lang.String... headers)
Specifies the headers to be exposed to calling clients.
|
static CorsConfigBuilder |
CorsConfigBuilder.forAnyOrigin()
Creates a Builder instance with it's origin set to '*'.
|
static CorsConfigBuilder |
CorsConfigBuilder.forOrigin(java.lang.String origin)
Creates a
CorsConfigBuilder instance with the specified origin. |
static CorsConfigBuilder |
CorsConfigBuilder.forOrigins(java.lang.String... origins)
Creates a
CorsConfigBuilder instance with the specified origins. |
CorsConfigBuilder |
CorsConfigBuilder.maxAge(long max)
When making a preflight request the client has to perform two request with can be inefficient.
|
CorsConfigBuilder |
CorsConfigBuilder.noPreflightResponseHeaders()
Specifies that no preflight response headers should be added to a preflight response.
|
<T> CorsConfigBuilder |
CorsConfigBuilder.preflightResponseHeader(java.lang.CharSequence name,
java.util.concurrent.Callable<T> valueGenerator)
Returns HTTP response headers that should be added to a CORS preflight response.
|
<T> CorsConfigBuilder |
CorsConfigBuilder.preflightResponseHeader(java.lang.CharSequence name,
java.lang.Iterable<T> value)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsConfigBuilder |
CorsConfigBuilder.preflightResponseHeader(java.lang.CharSequence name,
java.lang.Object... values)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsConfigBuilder |
CorsConfigBuilder.shortCircuit()
Specifies that a CORS request should be rejected if it's invalid before being
further processing.
|