public static interface Cors.Builder extends SdkPojo, CopyableBuilder<Cors.Builder,Cors>
Modifier and Type | Method and Description |
---|---|
Cors.Builder |
allowCredentials(Boolean allowCredentials)
Whether to allow cookies or other credentials in requests to your function URL.
|
Cors.Builder |
allowHeaders(Collection<String> allowHeaders)
The HTTP headers that origins can include in requests to your function URL.
|
Cors.Builder |
allowHeaders(String... allowHeaders)
The HTTP headers that origins can include in requests to your function URL.
|
Cors.Builder |
allowMethods(Collection<String> allowMethods)
The HTTP methods that are allowed when calling your function URL.
|
Cors.Builder |
allowMethods(String... allowMethods)
The HTTP methods that are allowed when calling your function URL.
|
Cors.Builder |
allowOrigins(Collection<String> allowOrigins)
The origins that can access your function URL.
|
Cors.Builder |
allowOrigins(String... allowOrigins)
The origins that can access your function URL.
|
Cors.Builder |
exposeHeaders(Collection<String> exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.
|
Cors.Builder |
exposeHeaders(String... exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.
|
Cors.Builder |
maxAge(Integer maxAge)
The maximum amount of time, in seconds, that web browsers can cache results of a preflight request.
|
equalsBySdkFields, sdkFields
copy
applyMutation, build
Cors.Builder allowCredentials(Boolean allowCredentials)
Whether to allow cookies or other credentials in requests to your function URL. The default is
false
.
allowCredentials
- Whether to allow cookies or other credentials in requests to your function URL. The default is
false
.Cors.Builder allowHeaders(Collection<String> allowHeaders)
The HTTP headers that origins can include in requests to your function URL. For example: Date
,
Keep-Alive
, X-Custom-Header
.
allowHeaders
- The HTTP headers that origins can include in requests to your function URL. For example:
Date
, Keep-Alive
, X-Custom-Header
.Cors.Builder allowHeaders(String... allowHeaders)
The HTTP headers that origins can include in requests to your function URL. For example: Date
,
Keep-Alive
, X-Custom-Header
.
allowHeaders
- The HTTP headers that origins can include in requests to your function URL. For example:
Date
, Keep-Alive
, X-Custom-Header
.Cors.Builder allowMethods(Collection<String> allowMethods)
The HTTP methods that are allowed when calling your function URL. For example: GET
,
POST
, DELETE
, or the wildcard character (*
).
allowMethods
- The HTTP methods that are allowed when calling your function URL. For example: GET
,
POST
, DELETE
, or the wildcard character (*
).Cors.Builder allowMethods(String... allowMethods)
The HTTP methods that are allowed when calling your function URL. For example: GET
,
POST
, DELETE
, or the wildcard character (*
).
allowMethods
- The HTTP methods that are allowed when calling your function URL. For example: GET
,
POST
, DELETE
, or the wildcard character (*
).Cors.Builder allowOrigins(Collection<String> allowOrigins)
The origins that can access your function URL. You can list any number of specific origins, separated by a
comma. For example: https://www.example.com
, http://localhost:60905
.
Alternatively, you can grant access to all origins using the wildcard character (*
).
allowOrigins
- The origins that can access your function URL. You can list any number of specific origins, separated
by a comma. For example: https://www.example.com
, http://localhost:60905
.
Alternatively, you can grant access to all origins using the wildcard character (*
).
Cors.Builder allowOrigins(String... allowOrigins)
The origins that can access your function URL. You can list any number of specific origins, separated by a
comma. For example: https://www.example.com
, http://localhost:60905
.
Alternatively, you can grant access to all origins using the wildcard character (*
).
allowOrigins
- The origins that can access your function URL. You can list any number of specific origins, separated
by a comma. For example: https://www.example.com
, http://localhost:60905
.
Alternatively, you can grant access to all origins using the wildcard character (*
).
Cors.Builder exposeHeaders(Collection<String> exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.
For example: Date
, Keep-Alive
, X-Custom-Header
.
exposeHeaders
- The HTTP headers in your function response that you want to expose to origins that call your function
URL. For example: Date
, Keep-Alive
, X-Custom-Header
.Cors.Builder exposeHeaders(String... exposeHeaders)
The HTTP headers in your function response that you want to expose to origins that call your function URL.
For example: Date
, Keep-Alive
, X-Custom-Header
.
exposeHeaders
- The HTTP headers in your function response that you want to expose to origins that call your function
URL. For example: Date
, Keep-Alive
, X-Custom-Header
.Cors.Builder maxAge(Integer maxAge)
The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By
default, this is set to 0
, which means that the browser doesn't cache results.
maxAge
- The maximum amount of time, in seconds, that web browsers can cache results of a preflight request. By
default, this is set to 0
, which means that the browser doesn't cache results.Copyright © 2022. All rights reserved.