Black Friday 2026: Get 70% OFF All Items & All Plans at Zamblek! - The biggest shopping event of the year is here! Mehr erfahren
What’s New with Sngine v5! - a brand-new default theme, a full Dating module, rebuilt Stories, Reels, Live and Chat, and a faster core that stays quick as your community grows. Mehr erfahren
Sngine 5.0 Release! - Our Sngine team is so pleased to announce the release of Sngine 5.0! With some improvements, Mehr erfahren

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 Min. Lesezeit
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