Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add a note about CORS on S3 buckets in the deployment documentation

NyanKiyoshi41c584f95bbf
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5931de8792..2e69c46dc8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ All notable, unreleased changes to this project will be documented in this file.
- Fix access to unpublished objects via API - #3724 by @Kwaidan00
- Add thumbnail to OrderLine, deprecate thumbnailUrl - #3737 by @michaljelonek
- Refactor translations in emails - #3701 by @Kwaidan00
+- Update S3 deployment documentation to include CORS configuration note - #3743 by @NyanKiyoshi
## 2.3.0
### API
diff --git a/docs/deployment/s3.rst b/docs/deployment/s3.rst
index ae0623cb6b..1a7f0797b2 100644
--- a/docs/deployment/s3.rst
+++ b/docs/deployment/s3.rst
@@ -51,3 +51,22 @@ you can set this environment variable to your custom S3 domain:
``AWS_STATIC_CUSTOM_DOMAIN``
The S3 custom domain to use for the static bucket.
+
+.. note::
+ You will need to configure your S3 bucket to allow cross origin requests for
+ some files to be properly served (SVG files, Javascript files, etc.).
+ For that, you have to the below instructions in your
+ S3 Bucket's permissions tab under the CORS section.
+
+ .. code-block:: xml
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
+ <CORSRule>
+ <AllowedOrigin>*</AllowedOrigin>
+ <AllowedMethod>GET</AllowedMethod>
+ <AllowedMethod>HEAD</AllowedMethod>
+ <MaxAgeSeconds>3000</MaxAgeSeconds>
+ <AllowedHeader>*</AllowedHeader>
+ </CORSRule>
+ </CORSConfiguration>