@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:01.987Z") @Stability(value=Experimental) public interface CorsPreflightOptions extends software.amazon.jsii.JsiiSerializable
Example:
HttpApi.Builder.create(this, "HttpProxyApi")
.corsPreflight(CorsPreflightOptions.builder()
.allowHeaders(List.of("Authorization"))
.allowMethods(List.of(CorsHttpMethod.GET, CorsHttpMethod.HEAD, CorsHttpMethod.OPTIONS, CorsHttpMethod.POST))
.allowOrigins(List.of("*"))
.maxAge(Duration.days(10))
.build())
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CorsPreflightOptions.Builder
A builder for
CorsPreflightOptions |
static class |
CorsPreflightOptions.Jsii$Proxy
An implementation for
CorsPreflightOptions |
| Modifier and Type | Method and Description |
|---|---|
static CorsPreflightOptions.Builder |
builder() |
default Boolean |
getAllowCredentials()
(experimental) Specifies whether credentials are included in the CORS request.
|
default List<String> |
getAllowHeaders()
(experimental) Represents a collection of allowed headers.
|
default List<CorsHttpMethod> |
getAllowMethods()
(experimental) Represents a collection of allowed HTTP methods.
|
default List<String> |
getAllowOrigins()
(experimental) Represents a collection of allowed origins.
|
default List<String> |
getExposeHeaders()
(experimental) Represents a collection of exposed headers.
|
default Duration |
getMaxAge()
(experimental) The duration that the browser should cache preflight request results.
|
@Stability(value=Experimental) @Nullable default Boolean getAllowCredentials()
Default: false
@Stability(value=Experimental) @Nullable default List<String> getAllowHeaders()
Default: - No Headers are allowed.
@Stability(value=Experimental) @Nullable default List<CorsHttpMethod> getAllowMethods()
Default: - No Methods are allowed.
@Stability(value=Experimental) @Nullable default List<String> getAllowOrigins()
Default: - No Origins are allowed.
@Stability(value=Experimental) @Nullable default List<String> getExposeHeaders()
Default: - No Expose Headers are allowed.
@Stability(value=Experimental) @Nullable default Duration getMaxAge()
Default: Duration.seconds(0)
@Stability(value=Experimental) static CorsPreflightOptions.Builder builder()
CorsPreflightOptions.Builder of CorsPreflightOptionsCopyright © 2022. All rights reserved.