FunctionUrlCors

data class FunctionUrlCors(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)

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

Whether to allow cookies or other credentials in requests to the function URL. The default is false.

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

The HTTP headers that origins can include in requests to the function URL. For example: ["date", "keep-alive", "x-custom-header"].

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

The HTTP methods that are allowed when calling the function URL. For example: ["GET", "POST", "DELETE"], or the wildcard character (["*"]).

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

The origins that can access the function URL. You can list any number of specific origins (or the wildcard character ("*")), separated by a comma. For example: ["https://www&#46;example&#46;com", "http://localhost:60905"].

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

The HTTP headers in your function response that you want to expose to origins that call the function URL.

Link copied to clipboard
val maxAge: Int? = null

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. The maximum value is 86400.