Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GCS get file Error with CORS: CORS Missing Allow Origin
- 1/ Install Gsuite: https://cloud.google.com/storage/docs/gsutil_install#install
- 2/ Login: gcloud auth login
- 3/ Get config list: gcloud config configurations list
- 4/ Register with new config: gcloud auth configure-docker
- 5/ Set default project: gcloud config set project [PROJECT-NAME]
- 6/ Set config again: gcloud auth configure-docker
- 7/ Configuring cross-origin resource sharing: https://cloud.google.com/storage/docs/configuring-cors
- - Create new file, named: cors-json-filetest.json at your local current folderhttps://pastebin.com/
- - Allow all with this config
- [
- {
- "origin": ["*"],
- "method": ["*"],
- "responseHeader": ["HEADER"],
- "maxAgeSeconds": 30000000
- }
- ]
- 8/ Set CORS: gsutil cors set cors-json-filetest.json gs://[BULKEE-NAME]
- 9/ Check CORS: gsutil cors get gs://[BULKEE-NAME]
Advertisement
Add Comment
Please, Sign In to add comment