I am trying to run the following az storage cli command to add CORS settings:
az storage cors --account-name mystorage --origins '*' --methods GET,POST,PUT --allowed-headers 'Accept-Ranges,Content-Encoding,Content-Length,Content-Type,Range,Authorization,x-ms-blob-content-type,x-ms-blob-type,x-ms-version' --exposed-headers 'Accept-Ranges,Content-Range,Content-Encoding,Content-Length,Content-Type' --max-age 86400 --services blob
BUt I get the following error:
az storage cors: 'mystorage' is not in the 'az storage cors' command group. See 'az storage cors --help'.
You forgot to include operation type ( add
in this case). Please try the following:
az storage cors add --account-name my storage --origins '*' --methods GET POST PUT --allowed-headers 'Accept-Ranges,Content-Encoding,Content-Length,Content-Type,Range,Authorization,x-ms-blob-content-type,x-ms-blob-type,x-ms-version' --exposed-headers 'Accept-Ranges,Content-Range,Content-Encoding,Content-Length,Content-Type' --max-age 86400 --services b
Two more things I noticed in your command:
--methods GET POST PUT
instead of method GET,POST,PUT
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.