@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-22T19:35:44.178Z")
public interface FunctionUrlCorsOptions
Example:
Function fn; fn.addFunctionUrl(FunctionUrlOptions.builder() .authType(FunctionUrlAuthType.NONE) .cors(FunctionUrlCorsOptions.builder() // Allow this to be called from websites on https://example.com. // Can also be ['*'] to allow all domain. .allowedOrigins(List.of("https://example.com")) .build()) .build());
Modifier and Type | Interface and Description |
---|---|
static class |
FunctionUrlCorsOptions.Builder
A builder for
FunctionUrlCorsOptions |
static class |
FunctionUrlCorsOptions.Jsii$Proxy
An implementation for
FunctionUrlCorsOptions |
Modifier and Type | Method and Description |
---|---|
static FunctionUrlCorsOptions.Builder |
builder() |
default java.lang.Boolean |
getAllowCredentials()
Whether to allow cookies or other credentials in requests to your function URL.
|
default java.util.List<java.lang.String> |
getAllowedHeaders()
Headers that are specified in the Access-Control-Request-Headers header.
|
default java.util.List<HttpMethod> |
getAllowedMethods()
An HTTP method that you allow the origin to execute.
|
default java.util.List<java.lang.String> |
getAllowedOrigins()
One or more origins you want customers to be able to access the bucket from.
|
default java.util.List<java.lang.String> |
getExposedHeaders()
One or more headers in the response that you want customers to be able to access from their applications.
|
default Duration |
getMaxAge()
The time in seconds that your browser is to cache the preflight response for the specified resource.
|
default java.lang.Boolean getAllowCredentials()
Default: false
default java.util.List<java.lang.String> getAllowedHeaders()
Default: - No headers allowed.
default java.util.List<HttpMethod> getAllowedMethods()
Default: - [HttpMethod.ALL]
default java.util.List<java.lang.String> getAllowedOrigins()
Default: - No origins allowed.
default java.util.List<java.lang.String> getExposedHeaders()
Default: - No headers exposed.
default Duration getMaxAge()
Default: - Browser default of 5 seconds.
static FunctionUrlCorsOptions.Builder builder()
FunctionUrlCorsOptions.Builder
of FunctionUrlCorsOptions