CORSConfig

Updated at:

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

The allowed request header name.

Content-Type

allowMethods

array

The list of allowed HTTP methods.

["GET", "POST", "OPTIONS"]

string

The allowed HTTP method.

GET

allowOrigins

array

The list of allowed origins.

["https://example.com", "https://app.example.com"]

string

The allowed origin.

https://example.com

exposeHeaders

array

The list of exposed response headers.

["X-Custom-Header"]

string

The name of the allowed exposed response header.

X-Custom-Header

maxAge

integer

The preflight request cache time, in seconds.

3600