0

我有一个来自 Azure 文件存储的文件的 SAS 链接,我想在 iframe 中使用这个链接

<iframe src = "http://localhost:8077/ViewerJS/index.html#https://myazureaccount.file.core.windows.net/myshare/mydirectorypath/myfile?SASTOKEN" width='300' height='300'></iframe>

或者发送简单的 HttpRequest

var http = new XMLHttpRequest();
http.open('GET', "https://myazureaccount.file.core.windows.net/myshare/mydirectorypath/myfile?SASTOKEN");
http.send();

我在 Azure 中为我的服务器启用了 CORS

CORS 设置

但我看到错误:

无法加载 https://myazureaccount.file.core.windows.net/myshare/mydirectorypath/myfile?SASTOKEN":请求的资源上不存在“Access-Control-Allow-Origin”标头。来源“http:// localhost:8077' 因此不允许访问。

4

0 回答 0