Storage Signed URL gives CORS error

Hello @icepaco33 !

Check out this documentation: Set up and view CORS configurations.

To setup the CORS configuration on a bucket, you can use the gcloud CLI. Use the following steps to set a CORS configuration on your bucket:

  1. Create a JSON file with the CORS configuration you would like to apply. Check the configuration examples for sample JSON files.

  2. Use the gcloud storage buckets update command with the –cors-file flag:

    gcloud storage buckets update gs://BUCKET_NAME --cors-file=CORS_CONFIG_FILE
    

To view the CORS configuration for a bucket, you can use the gcloud CLI and input the command:

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

If the above options don’t work, you can contact Google Cloud Support to further look into your case. Let me know if it helped, thanks!

2 Likes