Unverified Commit 18e2e33f by Mickael Kurmann Committed by GitHub

Update CORS example from XML to JSON (#17)

parent 33c7780d
...@@ -20,27 +20,39 @@ the bucket's CORS configuration. In the AWS S3 Console go to your bucket, click ...@@ -20,27 +20,39 @@ the bucket's CORS configuration. In the AWS S3 Console go to your bucket, click
on "Permissions" tab and then on "CORS configuration". There paste in the on "Permissions" tab and then on "CORS configuration". There paste in the
following: following:
```xml ```json
<?xml version="1.0" encoding="UTF-8"?> [
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> {
<CORSRule> "AllowedHeaders": [
<AllowedOrigin>https://my-app.com</AllowedOrigin> "content-type",
<AllowedMethod>GET</AllowedMethod> "x-amz-content-sha256",
<AllowedMethod>POST</AllowedMethod> "x-amz-date"
<AllowedMethod>PUT</AllowedMethod> ],
<MaxAgeSeconds>3000</MaxAgeSeconds> "AllowedMethods": [
<AllowedHeader>Authorization</AllowedHeader> "GET",
<AllowedHeader>x-amz-date</AllowedHeader> "POST",
<AllowedHeader>x-amz-content-sha256</AllowedHeader> "PUT"
<AllowedHeader>content-type</AllowedHeader> ],
<ExposeHeader>ETag</ExposeHeader> "AllowedOrigins": [
</CORSRule> "https://my-app.com"
<CORSRule> ],
<AllowedOrigin>*</AllowedOrigin> "ExposeHeaders": [
<AllowedMethod>GET</AllowedMethod> "ETag"
<MaxAgeSeconds>3000</MaxAgeSeconds> ],
</CORSRule> "MaxAgeSeconds": 3000
</CORSConfiguration> },
{
"AllowedHeaders": [],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
``` ```
Replace `https://my-app.com` with the URL to your app (in development you can Replace `https://my-app.com` with the URL to your app (in development you can
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment