Skip to main content

S3StorageCorsRuleSchema

Defines the schema for a CORS rule of the s3 storage, which lets a page on another origin call the bucket from a browser, e.g. to upload through a presigned URL or read a range of an object.

S3 answers a request with the first rule its origin, method and headers all match.

@group

Resources/S3Storage

Index

Properties

optionalallowHeaders

allowHeaders?: string[] = []

The request headers the calling page may send, e.g. ['Range'] to read part of an object. A name may use one *, and * alone allows every header. Header names are not case-sensitive.

allowMethods

allowMethods: (GET | HEAD | PUT | POST | DELETE)[]

The methods the calling page may use. See IS3StorageCorsMethod.

allowOrigins

allowOrigins: string[]

The origins allowed to call, each a scheme, a host, and a port when it is not the default, e.g. https://app.example.com. An origin may use one *, e.g. https://*.example.com, and * alone allows every origin.

optionalexposeHeaders

exposeHeaders?: string[] = []

The response headers the calling page may read beyond the ones every browser shows, e.g. ['ETag'].

optionalmaxAgeSeconds

maxAgeSeconds?: number | null = null

How long a browser may reuse the answer to a preflight request, in seconds. Omit it to let the browser decide.