Skip to content

Commit cc987dc

Browse files
symroecodingjoe
authored andcommitted
Convert CORS example to JSON
S3 is moving to JSON CORS configuration rather than XML: "In the new S3 console, the CORS configuration must be JSON" https://docs.aws.amazon.com/AmazonS3/latest/userguide/enabling-cors-examples.html
1 parent b0d9918 commit cc987dc

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,23 @@ CORS policy
9292
You will need to allow ``POST`` from all origins. Just add the following
9393
to your CORS policy.
9494

95-
.. code:: xml
96-
97-
<CORSConfiguration>
98-
<CORSRule>
99-
<AllowedOrigin>*</AllowedOrigin>
100-
<AllowedMethod>POST</AllowedMethod>
101-
<MaxAgeSeconds>3000</MaxAgeSeconds>
102-
<AllowedHeader>*</AllowedHeader>
103-
</CORSRule>
104-
</CORSConfiguration>
95+
.. code:: json
96+
97+
[
98+
{
99+
"AllowedHeaders": [
100+
"*"
101+
],
102+
"AllowedMethods": [
103+
"POST"
104+
],
105+
"AllowedOrigins": [
106+
"*"
107+
],
108+
"ExposeHeaders": [],
109+
"MaxAgeSeconds": 3000
110+
}
111+
]
105112
106113
Progress Bar
107114
------------

0 commit comments

Comments
 (0)