Created
September 4, 2020 21:08
-
-
Save jsoma/ed9eb3d0d42ea7db0f0b748a12d30951 to your computer and use it in GitHub Desktop.
CORS public access
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
<CORSConfiguration> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>GET</AllowedMethod> | |
</CORSRule> | |
</CORSConfiguration> |
new format as follow, see https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"http://www.example1.com"
],
"ExposeHeaders": []
},
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"http://www.example2.com"
],
"ExposeHeaders": []
},
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's showing this error - The CORS configuration must be written in valid JSON.