Bases: object
Specifies a cross-origin access property for a function URL.
allow_credentials (Optional
[bool
]) â Whether to allow cookies or other credentials in requests to your function URL. Default: false
allowed_headers (Optional
[Sequence
[str
]]) â Headers that are specified in the Access-Control-Request-Headers header. Default: - No headers allowed.
allowed_methods (Optional
[Sequence
[HttpMethod
]]) â An HTTP method that you allow the origin to execute. Default: - [HttpMethod.ALL]
allowed_origins (Optional
[Sequence
[str
]]) â One or more origins you want customers to be able to access the bucket from. Default: - No origins allowed.
exposed_headers (Optional
[Sequence
[str
]]) â One or more headers in the response that you want customers to be able to access from their applications. Default: - No headers exposed.
max_age (Optional
[Duration
]) â The time in seconds that your browser is to cache the preflight response for the specified resource. Default: - Browser default of 5 seconds.
infused
Example:
# fn: lambda.Function fn.add_function_url( auth_type=lambda_.FunctionUrlAuthType.NONE, cors=lambda.FunctionUrlCorsOptions( # Allow this to be called from websites on https://example.com. # Can also be ['*'] to allow all domain. allowed_origins=["https://example.com"] ) )
Attributes
Whether to allow cookies or other credentials in requests to your function URL.
false
Headers that are specified in the Access-Control-Request-Headers header.
No headers allowed.
An HTTP method that you allow the origin to execute.
[HttpMethod.ALL]
One or more origins you want customers to be able to access the bucket from.
No origins allowed.
One or more headers in the response that you want customers to be able to access from their applications.
No headers exposed.
The time in seconds that your browser is to cache the preflight response for the specified resource.
Browser default of 5 seconds.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4