Welcome to the new Zamblek — and the new Sngine website - The new Zamblek website is live — and with it, a new home for Sngine, your licenses, support, and the entire ecosystem. اعرف المزيد
What’s New with v4.5! - Sngine v4.5 comes with a lot of new features اعرف المزيد
Sngine 4.5 Release! - Our Sngine team is so pleased to announce the release of Sngine 4.5! With some improvements, اعرف المزيد

How To Set CORS Policy For Google Cloud Bucket?

To add CORS policy to your Google Cloud Storage Bucket you need to use your Cloud

Zamblek Zamblek 1 دقيقة قراءة
How To Set CORS Policy For Google Cloud Bucket?

To add CORS policy to your Google Cloud Storage Bucket you need to use your Cloud Terminal as you can see here:

Once you enable and open the terminal you need to run the following command which will create CORS policy config file for your bucket first

echo '[{"origin": ["*"],"method": ["GET"],"responseHeader": ["Content-Type"],"maxAgeSeconds": 3600}]' > cors-config.json

Then you need to attache this config file to your bucket after changing your YOUR_BUCKET_NAME

gcloud storage buckets update gs://YOUR_BUCKET_NAME --cors-file=cors-config.json

After that you can confirm if config file attached to your bucket correctly or not by run this command:

gcloud storage buckets describe gs://YOUR_BUCKET_NAME --format="default(cors_config)"

That’s it.

Happy Sngine 🙂

Buy Sngine or Extend your support: https://bit.ly/BuySngine