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

          <bdo id='20PbQ'></bdo><ul id='20PbQ'></ul>

      1. <tfoot id='20PbQ'></tfoot>

        <small id='20PbQ'></small><noframes id='20PbQ'>

        <i id='20PbQ'><tr id='20PbQ'><dt id='20PbQ'><q id='20PbQ'><span id='20PbQ'><b id='20PbQ'><form id='20PbQ'><ins id='20PbQ'></ins><ul id='20PbQ'></ul><sub id='20PbQ'></sub></form><legend id='20PbQ'></legend><bdo id='20PbQ'><pre id='20PbQ'><center id='20PbQ'></center></pre></bdo></b><th id='20PbQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='20PbQ'><tfoot id='20PbQ'></tfoot><dl id='20PbQ'><fieldset id='20PbQ'></fieldset></dl></div>
        <legend id='20PbQ'><style id='20PbQ'><dir id='20PbQ'><q id='20PbQ'></q></dir></style></legend>
      2. Access-Control-Allow-Origin 和 CORS 背后的概念是什么

        What is the concept behind Access-Control-Allow-Origin and CORS?(Access-Control-Allow-Origin 和 CORS 背后的概念是什么?)

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

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

                • <legend id='EY4n0'><style id='EY4n0'><dir id='EY4n0'><q id='EY4n0'></q></dir></style></legend>
                    <tbody id='EY4n0'></tbody>
                • 本文介紹了Access-Control-Allow-Origin 和 CORS 背后的概念是什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我并沒有真正了解 Access-Control-Allow-Origin 和 CORS.
                  如果我允許來自任何域的請求到我的頁面,這是否意味著我的頁面存在任何安全問題?

                  I don't really get Access-Control-Allow-Origin and CORS.
                  If I allow request from any domain to my page, does that imply any security issues for my page?

                  我一直認為,SOP 確保不能在頁面上運行任何腳本,該腳本從另一臺服務器請求數據,因為該數據可能是惡意的.但是,服務于惡意數據的服務器可以只回復包含 Access-Control-Allow-Origin:* 的標頭,因此可以從該服務器加載所有內容.
                  因此,一旦有人設法將一段 JS 代碼注入頁面,每個惡意代碼都可以從屬于攻擊者的服務器加載.

                  I always thought, that SOP ensures, that there can't run any script on a page, which requests data from another server, as that data might be malicious. But as the server, which serves the malicious data, can just reply with a header containing Access-Control-Allow-Origin:*, everything can be loaded from that server.
                  So as soon as somebody manages to inject a piece of JS code into a page, every malicious code can be loaded from a server belonging to the attacker.

                  Unitl 現在我假設我必須啟用跨域請求以允許我的頁面上的代碼從另一個域請求數據,但它似乎是相反的;另一個域必須允許我的域請求數據.我并沒有真正看到這個概念的安全優勢.
                  任何人都可以解釋這背后的概念或告訴我我是否完全錯了?

                  Unitl now I assumed, that I would have to enable cross domain requests to allow code on my page to request data from another domain but it seems to be the other way round; the other domain has to allow my domain to request data. I don't really see the security benefits of this concept.
                  Could anybody explain the concepts behind this or tell me if I am getting it all wrong?

                  推薦答案

                  鑒于:

                  • Alice,一個使用瀏覽器的用戶
                  • Bob,擁有網站的網站所有者
                  • Mallory,一個擁有網站的惡意網站所有者

                  Alice 在 Bob 的服務器上有一個帳戶.也許是她的網絡郵件.也許是她的網上銀行.也許這是她喜歡購物的地方.

                  Alice has an account on Bob's server. Maybe it is her webmail. Maybe it is her online banking. Maybe it is somewhere she likes to shop.

                  Alice 訪問 Mallory 的網站,卻不知道它是邪惡的.

                  Alice visits Mallory's website, not knowing that it is evil.

                  同源政策阻止 Mallory 的網站使用 JavaScript 告訴 Alice 的瀏覽器向 Bob 的網站發出請求,并將 Alice 的個人信息(例如她的銀行余額)提供給 Mallory 的網站(因此也提供給 Mallory).

                  The Same Origin Policy prevents Mallory's website from using JavaScript to tell Alice's browser to make a request to Bob's website and give Alice's personal information (her bank balance for instance) to Mallory's website (and therefore to Mallory).

                  (有時請求會被阻止,因為條件需要飛行前請求,其他時候請求會通過,但不會將響應提供給 Mallory 的站點.如果您想防御攻擊,請查找 CSRF危險在于服務器在收到請求時所做的事情,而不是響應中泄漏的信息).

                  (Sometimes the request will be blocked because the conditions require a pre-flight request, other times the request will go through but the response will not be provided to Mallory's site. Look up CSRF if you want to defend against attacks where the danger lies in what the server does when it gets the request rather then in information leaking from the response).

                  CORS 允許 Bob 說他網站上的資源不包含任何個人信息,因此允許其他網站訪問它是安全的(或者可以信任特定網站的個人信息).

                  CORS allows Bob to say that a resource on his website does not contain any personal information so that it is safe to allow other sites to access it (or that a particular site can be trusted with the personal information).

                  所以一旦有人設法將一段 JS 代碼注入到頁面中,

                  So as soon as somebody manages to inject a piece of JS code into a page,

                  XSS 是一個完全不同的安全問題.你需要防止人們注入 JS.

                  XSS is a completely different security problem. You need to prevent people injecting JS.

                  這篇關于Access-Control-Allow-Origin 和 CORS 背后的概念是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  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 無法加載,請求的資源上不存在“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 部分內容)
                    <bdo id='i4M9w'></bdo><ul id='i4M9w'></ul>

                        <legend id='i4M9w'><style id='i4M9w'><dir id='i4M9w'><q id='i4M9w'></q></dir></style></legend>

                        <tfoot id='i4M9w'></tfoot>
                          <tbody id='i4M9w'></tbody>

                      1. <small id='i4M9w'></small><noframes id='i4M9w'>

                        • <i id='i4M9w'><tr id='i4M9w'><dt id='i4M9w'><q id='i4M9w'><span id='i4M9w'><b id='i4M9w'><form id='i4M9w'><ins id='i4M9w'></ins><ul id='i4M9w'></ul><sub id='i4M9w'></sub></form><legend id='i4M9w'></legend><bdo id='i4M9w'><pre id='i4M9w'><center id='i4M9w'></center></pre></bdo></b><th id='i4M9w'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='i4M9w'><tfoot id='i4M9w'></tfoot><dl id='i4M9w'><fieldset id='i4M9w'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 激情综合五月 | 欧美在线观看一区 | 国产超碰人人爽人人做人人爱 | 午夜在线观看视频 | 久久综合久久自在自线精品自 | 亚洲精品68久久久一区 | 伊人网站 | 亚洲精品视频一区 | 天天综合亚洲 | 日日夜精品视频 | 中文字幕一区二区三区日韩精品 | 欧美成人在线网站 | 欧美一级久久久猛烈a大片 日韩av免费在线观看 | 欧美精品久久久 | 中文字幕亚洲一区 | 亚洲va国产日韩欧美精品色婷婷 | 成人在线播放 | 99re6在线视频精品免费 | 久久不卡 | 久久综合久色欧美综合狠狠 | 国产精品毛片无码 | 香蕉av免费| 亚洲人成免费 | 91av视频在线播放 | 日本成人免费观看 | 中文字字幕一区二区三区四区五区 | 精品福利在线 | 国产精品夜夜夜一区二区三区尤 | 国产成人综合在线 | 国产成人精品一区二区三区四区 | 日韩国产欧美一区 | 亚洲视频免费观看 | 中文字幕成人av | 一区二区av | 国产精品观看 | 视频在线一区 | 精品日韩一区二区三区av动图 | 久久精品a级毛片 | 在线成人| 丝袜美腿一区二区三区 | 久青草影院 |