Skip to content

Instantly share code, notes, and snippets.

@stuartleeks
Created November 13, 2015 10:54
Show Gist options
  • Save stuartleeks/8a2f323827eaae523bcf to your computer and use it in GitHub Desktop.
Save stuartleeks/8a2f323827eaae523bcf to your computer and use it in GitHub Desktop.
Command to set the CORS options for a storage account using Azure xplat CLI
# replace account name, key and cors rules
# ... and yes, I've regenerated my key since pasting ;-)
azure storage cors set --account-name slsas --account-key fkc8U4c86RotjO/VHg4jNKVUO+OsmkVvK+a800zhAcB6HQTVCFLRaiIAvJ9UaciFNmpgGHkod5731WGpw3+k7Q== --blob --cors '[{"AllowedMethods":["GET","OPTIONS","PUT"],"AllowedOrigins":["https://corsstoragetest.azurewebsites.net"],"AllowedHeaders":["Accept","Accept-Encoding","Accept-Language","Access-Control-Request-Headers","Access-Control-Request-Method","Cache-Control","Connection","Content-Type","DNT","Host","Origin","Pragma","Referer","User-Agent","x-ms-blob-content-type","x-ms-blob-type"],"ExposedHeaders":[],"MaxAgeInSeconds":60}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment