Azure存储的Blob:在斑点级别设置CORS? [英] Azure Storage Blob: set CORS on the blobs level?
问题描述
目前,我们已经建立了CORS与整个容器:
Azure存储CORS设置--blob静态--cors'[{AllowedOrigins:*,AllowedMethods:GET,MaxAgeInSeconds:86400} ]'
是否有可能直接和单独设置的规则为每一滴
在该容器中?
例如。 - 对静态/图像/ pic.png
设置AllowedOrigins:*
但静态/ CSS / style.css中
- 设置AllowedOrigins:google.com
是否有可能直接和单独设置的规则为每
该容器BLOB?
块引用>不幸的是没有。我理解
CORS
的方式是,它在某种程度上使2域之间的信任。随着Azure存储,域是由服务(如youraccount.blob.core.windows.net
等)。因此CORS规则被设定在服务级别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 forstatic/css/style.css
- set"AllowedOrigins":"google.com"
?解决方案Is there any possibility to set rule directly and separately for each blob in that container?
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.这篇关于Azure存储的Blob:在斑点级别设置CORS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!