CloudFrontCorsSchema
Index
Properties
allowCredentials
Whether to send Access-Control-Allow-Credentials: true, which lets the calling page send
cookies and Authorization, and read the response. A browser refuses such a response when the
allowed origin is *, so name the origins in allowOrigins.
allowHeaders
The request headers the calling page may send, e.g. ['Content-Type', 'x-session-id'].
A name may use * for any run of characters, e.g. x-app-*. * alone allows every header
except Authorization, which must be named. Header names are not case-sensitive.
allowMethods
The methods the calling page may use. See ICloudFrontCorsMethod.
allowOrigins
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. Write them in lowercase, as browsers send them.
*allows every origin.*may stand for the leftmost subdomains, e.g.https://*.example.com, which matcheshttps://www.example.comandhttps://a.b.example.com, but nothttps://example.com.*may stand for port digits, e.g.https://example.com:*.- An origin without a scheme, e.g.
example.com, matches bothhttpandhttps.
maxAgeSeconds
How long a browser may reuse the answer to a preflight request, in seconds. Browsers cap it:
Chrome at 7200, Firefox at 86400.
The CORS headers a response headers policy adds, which let a page on another origin call this distribution from a browser. They replace any CORS headers the origin sent.
Resources/CloudFrontDistribution