ApiCors

data class ApiCors(val allowCredentials: Boolean? = null, val allowHeaders: List<String>? = null, val allowMethods: List<String>? = null, val allowOrigins: List<String>? = null, val exposeHeaders: List<String>? = null, val maxAge: Int? = null)

The `Cors` property specifies a CORS configuration for an API. Supported only for HTTP APIs. See Configuring CORS for more information.

Constructors

Link copied to clipboard
constructor(allowCredentials: Boolean? = null, allowHeaders: List<String>? = null, allowMethods: List<String>? = null, allowOrigins: List<String>? = null, exposeHeaders: List<String>? = null, maxAge: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.

Link copied to clipboard
val allowHeaders: List<String>? = null

Represents a collection of allowed headers. Supported only for HTTP APIs.

Link copied to clipboard
val allowMethods: List<String>? = null

Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.

Link copied to clipboard
val allowOrigins: List<String>? = null

Represents a collection of allowed origins. Supported only for HTTP APIs.

Link copied to clipboard
val exposeHeaders: List<String>? = null

Represents a collection of exposed headers. Supported only for HTTP APIs.

Link copied to clipboard
val maxAge: Int? = null

The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.