Skip to content

Instantly share code, notes, and snippets.

@hyochan
Created March 1, 2023 07:58
Show Gist options
  • Save hyochan/224b42da1f0e393b6b5e473638865c2b to your computer and use it in GitHub Desktop.
Save hyochan/224b42da1f0e393b6b5e473638865c2b to your computer and use it in GitHub Desktop.
Firebase storage cors settings
## First open up terminal in https://console.cloud.google.com. Click button in right hand corner to open the terminal.
## Add to `cors-config.json`
echo '[{"origin": ["[YOUR-DOMAIN]"],"responseHeader": ["Content-Type"],"method": ["GET", "HEAD"],"maxAgeSeconds": 3600}]' > cors-config.json
## Set with gsutil
gsutil cors set cors-config.json gs://[YOUR-PROJECT-ID].appspot.com
## Checkout your input
gsutil cors get gs://wecount-2023.appspot.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment