kopia lustrzana https://github.com/wagtail/wagtail
Add notes for CORS settings on Google Cloud Storage
rodzic
707dc171dc
commit
637000fc08
|
@ -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.
|
||||
|
|
Ładowanie…
Reference in New Issue