S3 CORS
- Consider while using
S3
forStatic Website Hosting
- To allow cross-region request, we need to
enable CORS
inS3
- We can define specific origin or any origin using
*
- For
AllowMethod
, we can use the followings - GET
- PUT
- POST
- DELETE
- HEAD
- To allow sites,
http
andhttps
, we have to put 2Allow Origin
URL
CORS Rules
AllowedOrigin
: Specify the origins, can make the cross domain requestAllowedMethod
: Specify the cross-domain request methods,GET
,PUT
,POST
,DELETE
,HEAD
AllowedHeader
: Specify the preflight allowed headers
CORS Rules Element
MaxAgeSeconds
: Amount of time browser cache the responseExposeHeader
: :TODO