| Package | Description |
|---|---|
| com.linecorp.armeria.server.cors |
Cross-Origin Resource Sharing
(CORS) support.
|
| Modifier and Type | Method and Description |
|---|---|
CorsServiceBuilder |
CorsServiceBuilder.addPolicy(CorsPolicy policy)
Adds a
CorsPolicy instance in the service. |
CorsServiceBuilder |
CorsServiceBuilder.allowCredentials()
Enables cookies to be added to CORS requests.
|
CorsServiceBuilder |
CorsServiceBuilder.allowNullOrigin()
Enables a successful CORS response with a
"null" value for the CORS response header
"Access-Control-Allow-Origin". |
CorsServiceBuilder |
CorsServiceBuilder.allowRequestHeaders(CharSequence... headers)
Specifies the headers that should be returned in the CORS
"Access-Control-Allow-Headers"
response header. |
CorsServiceBuilder |
CorsServiceBuilder.allowRequestHeaders(Iterable<? extends CharSequence> headers)
Specifies the headers that should be returned in the CORS
"Access-Control-Allow-Headers"
response header. |
CorsServiceBuilder |
CorsServiceBuilder.allowRequestMethods(HttpMethod... methods)
Specifies the allowed set of HTTP request methods that should be returned in the
CORS
"Access-Control-Allow-Methods" response header. |
CorsServiceBuilder |
CorsServiceBuilder.allowRequestMethods(Iterable<HttpMethod> methods)
Specifies the allowed set of HTTP request methods that should be returned in the
CORS
"Access-Control-Allow-Methods" response header. |
CorsServiceBuilder |
ChainedCorsPolicyBuilder.and()
Returns the parent
CorsServiceBuilder. |
static CorsServiceBuilder |
CorsService.builder(Iterable<String> origins)
Returns a new
CorsServiceBuilder with the specified origins. |
static CorsServiceBuilder |
CorsService.builder(String... origins)
Returns a new
CorsServiceBuilder with the specified origins. |
static CorsServiceBuilder |
CorsService.builderForAnyOrigin()
Returns a new
CorsServiceBuilder with its origin set with "*" (any origin). |
CorsServiceBuilder |
CorsServiceBuilder.disablePreflightResponseHeaders()
Specifies that no preflight response headers should be added to a preflight response.
|
CorsServiceBuilder |
CorsServiceBuilder.exposeHeaders(CharSequence... headers)
Specifies the headers to be exposed to calling clients.
|
CorsServiceBuilder |
CorsServiceBuilder.exposeHeaders(Iterable<? extends CharSequence> headers)
Specifies the headers to be exposed to calling clients.
|
static CorsServiceBuilder |
CorsServiceBuilder.forAnyOrigin()
Deprecated.
|
static CorsServiceBuilder |
CorsServiceBuilder.forOrigin(String origin)
Deprecated.
|
static CorsServiceBuilder |
CorsServiceBuilder.forOrigins(Iterable<String> origins)
Deprecated.
|
static CorsServiceBuilder |
CorsServiceBuilder.forOrigins(String... origins)
Deprecated.
|
CorsServiceBuilder |
CorsServiceBuilder.maxAge(Duration maxAge)
Sets the CORS
"Access-Control-Max-Age" response header and enables the
caching of the preflight response for the specified time. |
CorsServiceBuilder |
CorsServiceBuilder.maxAge(long maxAge)
Sets the CORS
"Access-Control-Max-Age" response header and enables the
caching of the preflight response for the specified time. |
CorsServiceBuilder |
CorsServiceBuilder.preflightResponseHeader(CharSequence name,
Iterable<?> values)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsServiceBuilder |
CorsServiceBuilder.preflightResponseHeader(CharSequence name,
Object... values)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsServiceBuilder |
CorsServiceBuilder.preflightResponseHeader(CharSequence name,
Supplier<?> valueSupplier)
Returns HTTP response headers that should be added to a CORS preflight response.
|
CorsServiceBuilder |
CorsServiceBuilder.route(String pathPattern)
Adds a path pattern that this policy is supposed to be applied to.
|
CorsServiceBuilder |
CorsServiceBuilder.shortCircuit()
Specifies that a CORS request should be rejected if it's invalid before being
further processing.
|
Copyright © 2020 LeanCloud. All rights reserved.