Using CORS in Google Cloud Storage
Google Cloud Storage stores your data on Google's infrastructure with very high reliability, performance, and availability. You can use Google Cloud Storage to distribute large data objects to users via direct download.
Tip
Another potential way to iterate on settings quickly would be to move the settings
dictionary out of the code into data files such as json
or yaml
. Then you can edit those files by hand or even build a quick editor.
Configuring CORS on a bucket in Google Cloud Storage
Google Cloud Storage allows you to set CORS configuration at the bucket-level only. A CORS configuration on the bucket contains all the allowed origins and request methods.
There are multiple ways to set the CORS configuration on a bucket:
The
gsutil
cors set command gets, sets, or modifies CORS configuration.Send a request directly to the Google Cloud Storage XML API or JSON API. For example, you can use the
PUT
bucket method in the XML API, with the ?cors subresource in the...