Created
March 20, 2017 17:31
-
-
Save elnygren/387269e2e013195a18fda3a2fbf74527 to your computer and use it in GitHub Desktop.
S3 Cors settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo " | |
<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>" > the_cors | |
s3cmd --config doc/s3cmd2.cfg setcors ./the_cors s3://my-bucket |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment