Interface CorsPreflightOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CorsPreflightOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.238Z")
@Stability(Experimental)
public interface CorsPreflightOptions
extends software.amazon.jsii.JsiiSerializable
(experimental) Options for the CORS Configuration.
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();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCorsPreflightOptions
static final class
An implementation forCorsPreflightOptions
-
Method Summary
Modifier and TypeMethodDescriptionstatic CorsPreflightOptions.Builder
builder()
default Boolean
(experimental) Specifies whether credentials are included in the CORS request.(experimental) Represents a collection of allowed headers.default List<CorsHttpMethod>
(experimental) Represents a collection of allowed HTTP methods.(experimental) Represents a collection of allowed origins.(experimental) Represents a collection of exposed headers.default Duration
(experimental) The duration that the browser should cache preflight request results.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAllowCredentials
(experimental) Specifies whether credentials are included in the CORS request.Default: false
-
getAllowHeaders
(experimental) Represents a collection of allowed headers.Default: - No Headers are allowed.
-
getAllowMethods
(experimental) Represents a collection of allowed HTTP methods.Default: - No Methods are allowed.
-
getAllowOrigins
(experimental) Represents a collection of allowed origins.Default: - No Origins are allowed.
-
getExposeHeaders
(experimental) Represents a collection of exposed headers.Default: - No Expose Headers are allowed.
-
getMaxAge
(experimental) The duration that the browser should cache preflight request results.Default: Duration.seconds(0)
-
builder
- Returns:
- a
CorsPreflightOptions.Builder
ofCorsPreflightOptions
-