Currently, we have set CORS for the whole container with:
azure storage cors set --blob static --cors '[{"AllowedOrigins":"*","AllowedMethods":"GET","MaxAgeInSeconds":"86400"}]'
Is there any possibility to set rule directly and separately for each blob
in that container?
E.g. - for static/images/pic.png
set "AllowedOrigins":"*"
but for static/css/style.css
- set "AllowedOrigins":"google.com"
?
Unfortunately no. The way I understand
CORS
is that it somehow enables trust between 2 domains. With Azure Storage, the domains are by service (e.g.youraccount.blob.core.windows.net
etc.). Thus the CORS rules are set at the service level.