久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='UdYRf'></small><noframes id='UdYRf'>

    <legend id='UdYRf'><style id='UdYRf'><dir id='UdYRf'><q id='UdYRf'></q></dir></style></legend>
      <bdo id='UdYRf'></bdo><ul id='UdYRf'></ul>
        <i id='UdYRf'><tr id='UdYRf'><dt id='UdYRf'><q id='UdYRf'><span id='UdYRf'><b id='UdYRf'><form id='UdYRf'><ins id='UdYRf'></ins><ul id='UdYRf'></ul><sub id='UdYRf'></sub></form><legend id='UdYRf'></legend><bdo id='UdYRf'><pre id='UdYRf'><center id='UdYRf'></center></pre></bdo></b><th id='UdYRf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='UdYRf'><tfoot id='UdYRf'></tfoot><dl id='UdYRf'><fieldset id='UdYRf'></fieldset></dl></div>
        <tfoot id='UdYRf'></tfoot>

        如何在門戶的 Azure BLOB 存儲中設置 CORS?

        How can I set CORS in Azure BLOB Storage in Portal?(如何在門戶的 Azure BLOB 存儲中設置 CORS?)
          <bdo id='azGdV'></bdo><ul id='azGdV'></ul>

          <i id='azGdV'><tr id='azGdV'><dt id='azGdV'><q id='azGdV'><span id='azGdV'><b id='azGdV'><form id='azGdV'><ins id='azGdV'></ins><ul id='azGdV'></ul><sub id='azGdV'></sub></form><legend id='azGdV'></legend><bdo id='azGdV'><pre id='azGdV'><center id='azGdV'></center></pre></bdo></b><th id='azGdV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='azGdV'><tfoot id='azGdV'></tfoot><dl id='azGdV'><fieldset id='azGdV'></fieldset></dl></div>
          <tfoot id='azGdV'></tfoot>

                <small id='azGdV'></small><noframes id='azGdV'>

                  <legend id='azGdV'><style id='azGdV'><dir id='azGdV'><q id='azGdV'></q></dir></style></legend>
                    <tbody id='azGdV'></tbody>
                1. 本文介紹了如何在門戶的 Azure BLOB 存儲中設置 CORS?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我們在 Windows Azure 上有一個 blob 存儲.

                  We have a blob storage on Windows Azure.

                  http://mytest.blob.core.windows.net/forms
                  

                  我使用 CloudBerry 將一些文件上傳到存儲.我可以通過瀏覽器成功下載文件.這些文件是簡單的文本文件,但具有不同的文件擴展名.例如,

                  I uploaded a few files to the storage using CloudBerry. And I can download the files by browsers successfully. These files are simple text files, but with different file extensions. For example,

                  http://mytest.blob.core.windows.net/forms/f001.etx
                  

                  我想通過 jquery ($.get) 下載文件,但是由于 CORS 失敗.

                  I want to download the files via jquery ($.get), however, it failed because of CORS.

                  如何在 Portal 的 Azure BLOB 存儲中配置 CORS?

                  How can I configure CORS in Azure BLOB Storage in Portal?

                  而且,我也應該在客戶端為 CORS 做點什么嗎?

                  And, should I do something for CORS in the client side too?

                  推薦答案

                  更新: 在回答此問題時,Azure 門戶沒有此功能.它現在按照此處概述的方式進行.下面概述了在添加 UI 之前執行此操作的方法.

                  UPDATE: At the time of this answer the Azure Portal did not have this feature. It does now as outlined here. The following outlines the way to do this before the UI was added.

                  如何在 Portal 的 Azure BLOB 存儲中配置 CORS?

                  How can I configure CORS in Azure BLOB Storage in Portal?

                  如果您愿意,您可以隨時以編程方式設置 Blob 存儲的 CORS 規則.如果您使用的是 .Net 存儲客戶端庫,請查看存儲團隊的這篇博文:http://blogs.msdn.com/b/windowsazurestorage/archive/2014/02/03/windows-azure-storage-introducing-cors.aspx.從該博客文章中設置 CORS 設置的代碼:

                  If you want you can always set the CORS rules for blob storage programmatically. If you're using .Net Storage Client library, check out this blog post from storage team: http://blogs.msdn.com/b/windowsazurestorage/archive/2014/02/03/windows-azure-storage-introducing-cors.aspx. Code for setting CORS setting from that blog post:

                  private static void InitializeCors()
                  {
                       // CORS should be enabled once at service startup
                       // Given a BlobClient, download the current Service Properties 
                       ServiceProperties blobServiceProperties = BlobClient.GetServiceProperties();
                       ServiceProperties tableServiceProperties = TableClient.GetServiceProperties();
                  
                       // Enable and Configure CORS
                       ConfigureCors(blobServiceProperties);
                       ConfigureCors(tableServiceProperties);
                  
                       // Commit the CORS changes into the Service Properties
                       BlobClient.SetServiceProperties(blobServiceProperties);
                       TableClient.SetServiceProperties(tableServiceProperties);
                  }
                  
                  private static void ConfigureCors(ServiceProperties serviceProperties)
                  {
                      serviceProperties.Cors = new CorsProperties();
                      serviceProperties.Cors.CorsRules.Add(new CorsRule()
                      {
                          AllowedHeaders = new List<string>() { "*" },
                          AllowedMethods = CorsHttpMethods.Put | CorsHttpMethods.Get | CorsHttpMethods.Head | CorsHttpMethods.Post,
                          AllowedOrigins = new List<string>() { "*" },
                          ExposedHeaders = new List<string>() { "*" },
                          MaxAgeInSeconds = 1800 // 30 minutes
                       });
                  }
                  

                  如果您正在尋找一種工具來做同樣的事情,一些存儲資源管理器支持配置 CORS - Azure 存儲資源管理器、Cerebrata Azure Management Studio、Cloud Portam(披露 - 我正在構建 Cloud Portam 實用程序).

                  If you're looking for a tool to do the same, a few storage explorers have support for configuring CORS - Azure Storage Explorer, Cerebrata Azure Management Studio, Cloud Portam (Disclosure - I'm building Cloud Portam utility).

                  正確配置 CORS 后,您可以使用 Rory 的回答中提到的代碼從 blob 存儲下載文件.正如 Rory 所說,您不必在客戶端做任何特別的事情.

                  Once the CORS is configured properly, you can use the code mentioned in Rory's answer to download the file from blob storage. You don't have to do anything special on the client side as mentioned by Rory.

                  這篇關于如何在門戶的 Azure BLOB 存儲中設置 CORS?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                  XmlHttpRequest onprogress interval(XmlHttpRequest onprogress 間隔)
                  <i id='RXiIP'><tr id='RXiIP'><dt id='RXiIP'><q id='RXiIP'><span id='RXiIP'><b id='RXiIP'><form id='RXiIP'><ins id='RXiIP'></ins><ul id='RXiIP'></ul><sub id='RXiIP'></sub></form><legend id='RXiIP'></legend><bdo id='RXiIP'><pre id='RXiIP'><center id='RXiIP'></center></pre></bdo></b><th id='RXiIP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='RXiIP'><tfoot id='RXiIP'></tfoot><dl id='RXiIP'><fieldset id='RXiIP'></fieldset></dl></div>

                  • <tfoot id='RXiIP'></tfoot>

                    1. <legend id='RXiIP'><style id='RXiIP'><dir id='RXiIP'><q id='RXiIP'></q></dir></style></legend>

                          <bdo id='RXiIP'></bdo><ul id='RXiIP'></ul>

                          <small id='RXiIP'></small><noframes id='RXiIP'>

                            <tbody id='RXiIP'></tbody>
                          1. 主站蜘蛛池模板: 中文字幕国产高清 | 中文字幕在线播放第一页 | 日本精品一区二区三区在线观看视频 | 国产欧美在线 | 久久精品亚洲精品 | 中文字幕在线观看第一页 | 在线视频成人 | 特黄毛片 | 成人乱人乱一区二区三区软件 | 北条麻妃99精品青青久久 | 在线观看 亚洲 | 日韩中文字幕在线视频 | 在线欧美一区 | 亚洲国产中文在线 | 日韩视频精品在线 | 久久午夜视频 | 精品一区二区三区在线观看国产 | 欧美久久久久久 | 精品国产一区二区 | 日韩中文字幕高清 | 特级毛片 | 亚欧洲精品在线视频免费观看 | 九九久久这里只有精品 | 99精品网站 | 亚洲乱码一区二区 | 韩国主播午夜大尺度福利 | 日本精品视频在线观看 | 一区二区视频在线 | 久久久国产一区二区三区 | 国产日韩欧美二区 | 欧美日韩中文字幕在线播放 | www.伊人.com| 精品久久久久久久久久久 | 国产精品2 | 老司机67194精品线观看 | 欧美日韩精品一区二区三区四区 | 国产激情偷乱视频一区二区三区 | 亚洲午夜精品 | 亚洲国产成人av好男人在线观看 | 在线播放国产一区二区三区 | 久草日韩 |