R2BucketCorsRule

data class R2BucketCorsRule(val allowed: R2BucketCorsRuleAllowed, val exposeHeaders: List<String>? = null, val id: String? = null, val maxAgeSeconds: Double? = null)

Constructors

Link copied to clipboard
constructor(allowed: R2BucketCorsRuleAllowed, exposeHeaders: List<String>? = null, id: String? = null, maxAgeSeconds: Double? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Object specifying allowed origins, methods and headers for this CORS rule.

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

Specifies the headers that can be exposed back, and accessed by, the JavaScript making the cross-origin request. If you need to access headers beyond the safelisted response headers, such as Content-Encoding or cf-cache-status, you must specify it here.

Link copied to clipboard
val id: String? = null

Identifier for this rule

Link copied to clipboard
val maxAgeSeconds: Double? = null

Specifies the amount of time (in seconds) browsers are allowed to cache CORS preflight responses. Browsers may limit this to 2 hours or less, even if the maximum value (86400) is specified.