diff --git a/docs/advanced_topics/deploying.rst b/docs/advanced_topics/deploying.rst index c7be719489..520c50a264 100644 --- a/docs/advanced_topics/deploying.rst +++ b/docs/advanced_topics/deploying.rst @@ -57,4 +57,24 @@ If you are also serving Wagtail's static files from remote storage (using Django 'Access-Control-Allow-Origin': '*' } +For Google Cloud Storage, create a ``cors.json`` configuration: + +.. code-block:: json + + [ + { + "origin": ["*"], + "responseHeader": ["Content-Type"], + "method": ["GET"], + "maxAgeSeconds": 3600 + } + ] + +Then, apply this CORS configuration to the storage bucket: + +.. code-block:: shell + + gsutil cors set cors.json gs://$GS_BUCKET_NAME + + For other storage services, refer to your provider's documentation, or the documentation for the Django storage backend library you're using.