|
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
object |
The CORS configuration. |
||
| allowCredentials |
boolean |
Specifies whether to allow sending credentials. |
true |
| allowHeaders |
array |
The list of allowed request headers. |
["Content-Type", "Authorization"] |
|
string |
|||
| allowMethods |
array |
The list of allowed HTTP methods. |
["GET", "POST", "OPTIONS"] |
|
string |
|||
| allowOrigins |
array |
The list of allowed origins. |
["https://example.com", "https://app.example.com"] |
|
string |
|||
| exposeHeaders |
array |
The list of exposed response headers. |
["X-Custom-Header"] |
|
string |
|||
| maxAge |
integer |
The cache time for preflight requests, in seconds. |
3600 |
CORSConfig
Updated at:
Is this page helpful?