@Stability(value=Experimental) @Internal public static final class CorsOptions.Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CorsOptions
CorsOptions
software.amazon.jsii.JsiiObject.InitializationMode
CorsOptions.Builder, CorsOptions.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
Constructor that initializes the object based on values retrieved from the JsiiObject.
|
protected |
Jsii$Proxy(List<String> allowOrigins,
Boolean allowCredentials,
List<String> allowHeaders,
List<String> allowMethods,
Boolean disableCache,
List<String> exposeHeaders,
Duration maxAge,
Number statusCode)
Constructor that initializes the object based on literal property values passed by the
CorsOptions.Builder . |
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
$jsii$toJson() |
boolean |
equals(Object o) |
Boolean |
getAllowCredentials()
(experimental) The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request's credentials mode (Request.credentials) is "include".
|
List<String> |
getAllowHeaders()
(experimental) The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the Access-Control-Request-Headers to indicate which HTTP headers can be used during the actual request.
|
List<String> |
getAllowMethods()
(experimental) The Access-Control-Allow-Methods response header specifies the method or methods allowed when accessing the resource in response to a preflight request.
|
List<String> |
getAllowOrigins()
(experimental) Specifies the list of origins that are allowed to make requests to this resource.
|
Boolean |
getDisableCache()
(experimental) Sets Access-Control-Max-Age to -1, which means that caching is disabled.
|
List<String> |
getExposeHeaders()
(experimental) The Access-Control-Expose-Headers response header indicates which headers can be exposed as part of the response by listing their names.
|
Duration |
getMaxAge()
(experimental) The Access-Control-Max-Age response header indicates how long the results of a preflight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.
|
Number |
getStatusCode()
(experimental) Specifies the response status code returned from the OPTIONS method.
|
int |
hashCode() |
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
builder
protected Jsii$Proxy(software.amazon.jsii.JsiiObjectRef objRef)
objRef
- Reference to the JSII managed object.protected Jsii$Proxy(List<String> allowOrigins, Boolean allowCredentials, List<String> allowHeaders, List<String> allowMethods, Boolean disableCache, List<String> exposeHeaders, Duration maxAge, Number statusCode)
CorsOptions.Builder
.public final List<String> getAllowOrigins()
CorsOptions
If you wish to allow all origins, specify Cors.ALL_ORIGINS
or
[ * ]
.
Responses will include the Access-Control-Allow-Origin
response header.
If Cors.ALL_ORIGINS
is specified, the Vary: Origin
response header will
also be included.
getAllowOrigins
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
public final Boolean getAllowCredentials()
CorsOptions
When a request's credentials mode (Request.credentials) is "include", browsers will only expose the response to frontend JavaScript code if the Access-Control-Allow-Credentials value is true.
Credentials are cookies, authorization headers or TLS client certificates.
Default: false
getAllowCredentials
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
public final List<String> getAllowHeaders()
CorsOptions
Default: Cors.DEFAULT_HEADERS
getAllowHeaders
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
public final List<String> getAllowMethods()
CorsOptions
If ANY
is specified, it will be expanded to Cors.ALL_METHODS
.
Default: Cors.ALL_METHODS
getAllowMethods
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
public final Boolean getDisableCache()
CorsOptions
This option cannot be used with maxAge
.
Default: - cache is enabled
getDisableCache
in interface CorsOptions
public final List<String> getExposeHeaders()
CorsOptions
If you want clients to be able to access other headers, you have to list them using the Access-Control-Expose-Headers header.
Default: - only the 6 CORS-safelisted response headers are exposed: Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma
getExposeHeaders
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
public final Duration getMaxAge()
CorsOptions
To disable caching altogether use disableCache: true
.
Default: - browser-specific (see reference)
getMaxAge
in interface CorsOptions
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age
public final Number getStatusCode()
CorsOptions
Default: 204
getStatusCode
in interface CorsOptions
@Internal public com.fasterxml.jackson.databind.JsonNode $jsii$toJson()
$jsii$toJson
in interface software.amazon.jsii.JsiiSerializable
Copyright © 2021. All rights reserved.