How to configure bucket's CORS in AWS.
Because we sometimes need cross-domain access.
Please refer to the article:
https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors
Content.
The following configuration parameters are the configuration parameters of the rule:
<CORSConfiguration> <CORSRule> <AllowedOrigin>http://www.example1.com</AllowedOrigin> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> <CORSRule> <AllowedOrigin>http://www.example2.com</AllowedOrigin> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>DELETE</AllowedMethod> <AllowedHeader>*</AllowedHeader> </CORSRule> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> </CORSRule> </CORSConfiguration>
If you want to open to all domain names you visit, you only need to configure one
<AllowedOrigin>*</AllowedOrigin>
The rules are fine.
The specific configuration location is in your bucket.
https://www.cwiki.us/questions/57939120
Please refer to the article:
https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors
Content.
The following configuration parameters are the configuration parameters of the rule:
If you want to open to all domain names you visit, you only need to configure one
<AllowedOrigin>*</AllowedOrigin>
The rules are fine.
The specific configuration location is in your bucket.