/AWS1/CL_LMDCORS¶
The cross-origin resource sharing (CORS) settings for your Lambda function URL. Use CORS to grant access to your function URL from any origin. You can also use CORS to control access for specific HTTP headers and methods in requests to your function URL.
CONSTRUCTOR
¶
IMPORTING¶
Optional arguments:¶
IV_ALLOWCREDENTIALS
TYPE /AWS1/LMDALLOWCREDENTIALS
/AWS1/LMDALLOWCREDENTIALS
¶
Whether to allow cookies or other credentials in requests to your function URL. The default is
false
.
IT_ALLOWHEADERS
TYPE /AWS1/CL_LMDHEADERSLIST_W=>TT_HEADERSLIST
TT_HEADERSLIST
¶
The HTTP headers that origins can include in requests to your function URL. For example:
Date
,Keep-Alive
,X-Custom-Header
.
IT_ALLOWMETHODS
TYPE /AWS1/CL_LMDALLOWMETHODSLIST_W=>TT_ALLOWMETHODSLIST
TT_ALLOWMETHODSLIST
¶
The HTTP methods that are allowed when calling your function URL. For example:
GET
,POST
,DELETE
, or the wildcard character (*
).
IT_ALLOWORIGINS
TYPE /AWS1/CL_LMDALLOWORIGINSLIST_W=>TT_ALLOWORIGINSLIST
TT_ALLOWORIGINSLIST
¶
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 (
*
).
IT_EXPOSEHEADERS
TYPE /AWS1/CL_LMDHEADERSLIST_W=>TT_HEADERSLIST
TT_HEADERSLIST
¶
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
.
IV_MAXAGE
TYPE /AWS1/LMDMAXAGE
/AWS1/LMDMAXAGE
¶
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.
Queryable Attributes¶
AllowCredentials¶
Whether to allow cookies or other credentials in requests to your function URL. The default is
false
.
Accessible with the following methods¶
Method | Description |
---|---|
GET_ALLOWCREDENTIALS() |
Getter for ALLOWCREDENTIALS, with configurable default |
ASK_ALLOWCREDENTIALS() |
Getter for ALLOWCREDENTIALS w/ exceptions if field has no va |
HAS_ALLOWCREDENTIALS() |
Determine if ALLOWCREDENTIALS has a value |
AllowHeaders¶
The HTTP headers that origins can include in requests to your function URL. For example:
Date
,Keep-Alive
,X-Custom-Header
.
Accessible with the following methods¶
Method | Description |
---|---|
GET_ALLOWHEADERS() |
Getter for ALLOWHEADERS, with configurable default |
ASK_ALLOWHEADERS() |
Getter for ALLOWHEADERS w/ exceptions if field has no value |
HAS_ALLOWHEADERS() |
Determine if ALLOWHEADERS has a value |
AllowMethods¶
The HTTP methods that are allowed when calling your function URL. For example:
GET
,POST
,DELETE
, or the wildcard character (*
).
Accessible with the following methods¶
Method | Description |
---|---|
GET_ALLOWMETHODS() |
Getter for ALLOWMETHODS, with configurable default |
ASK_ALLOWMETHODS() |
Getter for ALLOWMETHODS w/ exceptions if field has no value |
HAS_ALLOWMETHODS() |
Determine if ALLOWMETHODS has a value |
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 (
*
).
Accessible with the following methods¶
Method | Description |
---|---|
GET_ALLOWORIGINS() |
Getter for ALLOWORIGINS, with configurable default |
ASK_ALLOWORIGINS() |
Getter for ALLOWORIGINS w/ exceptions if field has no value |
HAS_ALLOWORIGINS() |
Determine if ALLOWORIGINS has a value |
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
.
Accessible with the following methods¶
Method | Description |
---|---|
GET_EXPOSEHEADERS() |
Getter for EXPOSEHEADERS, with configurable default |
ASK_EXPOSEHEADERS() |
Getter for EXPOSEHEADERS w/ exceptions if field has no value |
HAS_EXPOSEHEADERS() |
Determine if EXPOSEHEADERS has a value |
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.
Accessible with the following methods¶
Method | Description |
---|---|
GET_MAXAGE() |
Getter for MAXAGE, with configurable default |
ASK_MAXAGE() |
Getter for MAXAGE w/ exceptions if field has no value |
HAS_MAXAGE() |
Determine if MAXAGE has a value |