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

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

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

    <tfoot id='JnV4q'></tfoot>

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

      1. <legend id='JnV4q'><style id='JnV4q'><dir id='JnV4q'><q id='JnV4q'></q></dir></style></legend>
      2. 從 &lt;iframe&gt; 發(fā)出的 XHR 請(qǐng)求的 Origin 標(biāo)頭

        Origin header null for XHR request made from lt;iframegt; with sandbox attribute(從 lt;iframegt; 發(fā)出的 XHR 請(qǐng)求的 Origin 標(biāo)頭為空帶沙盒屬性)
          <tbody id='QyWVD'></tbody>

            <bdo id='QyWVD'></bdo><ul id='QyWVD'></ul>
            <tfoot id='QyWVD'></tfoot>
            • <small id='QyWVD'></small><noframes id='QyWVD'>

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

                • 本文介紹了從 &lt;iframe&gt; 發(fā)出的 XHR 請(qǐng)求的 Origin 標(biāo)頭為空帶沙盒屬性的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我有一個(gè)項(xiàng)目,我正在嘗試從數(shù)據(jù)處理程序以制表符分隔值格式下載一些數(shù)據(jù),但是,Google Chrome 正在為 Origin 標(biāo)頭值發(fā)送空值.

                  I have a project where I am trying download some data in a tab separated value format from a datahandler however, Google Chrome is sending a null value for the Origin header value.

                  當(dāng)我導(dǎo)航到 http://server.corp.somebiz.com/reportpages/Report_Page_Requests_Over_Time.aspx?app=76ac42b7-ba6f-4be4-b297-758ebc9fe615

                  var url = 'http://server.corp.somebiz.com/DataHandlers/ReportSets.ashx?task=pagerequestsovertime&app=188d1956-c4a7-42f7-9bdd-38f54c14e125&format=tsv';
                  
                  d3.tsv(url, function(d) {
                    d.date = parseTime(d.date);
                    d.close = +d.close;
                    return d;
                  }, function(error, data) {
                    if (error) throw error;
                  
                    console.log('Do stuff');
                  });
                  

                  以下是請(qǐng)求的原始標(biāo)頭:

                  Here are the raw headers on the request:

                  GET /DataHandlers/ReportSets.ashx?task=pagerequestsovertime&app=786b5ef3-1389-4890-8004-533fd1f66f16&format=tsv HTTP/1.1
                  Host: server.corp.somebiz.com
                  Connection: keep-alive
                  accept: text/tab-separated-values,*/*
                  Origin: null
                  User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
                  Accept-Encoding: gzip, deflate, sdch
                  Accept-Language: en-US,en;q=0.8
                  

                  這以控制臺(tái)上的錯(cuò)誤結(jié)束:

                  This ends with an error on the console:

                  XMLHttpRequest cannot load http://server.corp.somebiz.com/DataHandlers/ReportSets.ashx?task=pagere…6ac42b7-ba6f-4be4-b297-758ebc9fe615&start=2/1/2017&end=3/2/2017&format=tsv. The 'Access-Control-Allow-Origin' header has a value 'http://server.corp.somebiz.com' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
                  

                  我不僅要查找為什么會(huì)發(fā)生這種情況,還要查找導(dǎo)致 Chrome 向服務(wù)器發(fā)送空 Origin 標(biāo)頭的條件.

                  Not only am I looking for the why is this happening, what the conditions are that leads to Chrome sending a null Origin header to the server.

                  這似乎是 Chrome 特有的問(wèn)題,因?yàn)?Internet Explorer 11 正在向服務(wù)器發(fā)送正確的 Origin 值.

                  This seems to be a Chrome specific issue as Internet Explorer 11 is sending the proper Origin value to the server.

                  更新:添加另一個(gè)皺紋,這可能是也可能不是促成因素.

                  Update: To add another wrinkle, that may or may not be a contributing factor.

                  我在 <iframe> 元素中加載調(diào)用頁(yè)面以隔離腳本化元素.在 iframe 之外調(diào)用頁(yè)面會(huì)導(dǎo)致不同的行為,Chrome 上的 Origin 標(biāo)頭完全丟失.

                  I load the calling page in an <iframe> element to isolate scripted elements. Calling the page outside of the iframe causes a different behavior, the Origin header on Chrome is missing entirely.

                  推薦答案

                  如果你加載調(diào)用頁(yè)面的 iframe 有一個(gè) sandbox 屬性不包含值 allow-same-origin, 瀏覽器給它一個(gè)唯一"的來(lái)源:

                  If the iframe you’re loading the calling page in has a sandbox attribute that doesn’t contain the value allow-same-origin, browsers give it a "unique" origin:

                  當(dāng)設(shè)置 [sandbox] 屬性時(shí),內(nèi)容被視為來(lái)自唯一來(lái)源,禁用表單、腳本和各種可能令人討厭的 API,阻止鏈接針對(duì)其他瀏覽上下文,并且插件是安全的.allow-same-origin 關(guān)鍵字導(dǎo)致內(nèi)容被視為來(lái)自其真實(shí)來(lái)源,而不是強(qiáng)制它成為唯一來(lái)源

                  When the [sandbox] attribute is set, the content is treated as being from a unique origin, forms, scripts, and various potentially annoying APIs are disabled, links are prevented from targeting other browsing contexts, and plugins are secured. The allow-same-origin keyword causes the content to be treated as being from its real origin instead of forcing it into a unique origin

                  ...當(dāng)確定要在跨域請(qǐng)求中發(fā)送的 Origin 標(biāo)頭的值時(shí),瀏覽器將任何唯一的來(lái)源序列化為 null 并給出 Origin 標(biāo)頭該值.

                  …and when determining the value of the Origin header to send in a cross-origin request, browsers serialize any unique origin as null and give the Origin header that value.

                  這篇關(guān)于從 &lt;iframe&gt; 發(fā)出的 XHR 請(qǐng)求的 Origin 標(biāo)頭為空帶沙盒屬性的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無(wú)法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)
                • <i id='bvIde'><tr id='bvIde'><dt id='bvIde'><q id='bvIde'><span id='bvIde'><b id='bvIde'><form id='bvIde'><ins id='bvIde'></ins><ul id='bvIde'></ul><sub id='bvIde'></sub></form><legend id='bvIde'></legend><bdo id='bvIde'><pre id='bvIde'><center id='bvIde'></center></pre></bdo></b><th id='bvIde'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='bvIde'><tfoot id='bvIde'></tfoot><dl id='bvIde'><fieldset id='bvIde'></fieldset></dl></div>

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

                    <tbody id='bvIde'></tbody>

                      <legend id='bvIde'><style id='bvIde'><dir id='bvIde'><q id='bvIde'></q></dir></style></legend>
                      • <bdo id='bvIde'></bdo><ul id='bvIde'></ul>

                            <tfoot id='bvIde'></tfoot>
                            主站蜘蛛池模板: 亚洲成人精品一区 | 不卡欧美| 日韩精品一区二区三区四区 | 日韩在线观看一区 | 精品视频国产 | 精品国产第一区二区三区 | 91麻豆精品国产91久久久久久 | 欧美精品国产精品 | www.jizzjizz| 精久久久 | 日韩av在线免费 | 亚洲国产精品久久久久婷婷老年 | 中文字幕 在线观看 | 亚洲国产一区二区三区在线观看 | 国产免费一区 | 亚洲精品一区中文字幕乱码 | 国产高清免费视频 | 99亚洲精品 | 亚洲一区高清 | 天天操操| 99久久99| 国产精品一区二区三区99 | 丁香婷婷综合激情五月色 | 99久久婷婷国产综合精品首页 | 国产在线观看一区二区 | 精品一区在线免费观看 | 欧美一区二区视频 | 成人看片在线观看 | 亚洲欧美在线免费观看 | 久久99蜜桃综合影院免费观看 | 久久久蜜臀国产一区二区 | 欧美日韩综合一区 | 亚洲精品免费看 | 国产精品视频播放 | 日本在线黄色 | 国产精品18hdxxxⅹ在线 | 国产视频精品在线 | 久久久久国产精品免费免费搜索 | 日韩欧美在线播放 | 久热国产精品视频 | 国产电影一区二区在线观看 |