pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

          <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="osymmve" 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="tid38iz" 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 背后的概念是什么?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

                  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?

                  我一直認(rèn)為,SOP 確保不能在頁(yè)面上運(yùn)行任何腳本,該腳本從另一臺(tái)服務(wù)器請(qǐng)求數(shù)據(jù),因?yàn)樵摂?shù)據(jù)可能是惡意的.但是,服務(wù)于惡意數(shù)據(jù)的服務(wù)器可以只回復(fù)包含 Access-Control-Allow-Origin:* 的標(biāo)頭,因此可以從該服務(wù)器加載所有內(nèi)容.
                  因此,一旦有人設(shè)法將一段 JS 代碼注入頁(yè)面,每個(gè)惡意代碼都可以從屬于攻擊者的服務(wù)器加載.

                  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 現(xiàn)在我假設(shè)我必須啟用跨域請(qǐng)求以允許我的頁(yè)面上的代碼從另一個(gè)域請(qǐng)求數(shù)據(jù),但它似乎是相反的;另一個(gè)域必須允許我的域請(qǐng)求數(shù)據(jù).我并沒有真正看到這個(gè)概念的安全優(yōu)勢(shì).
                  任何人都可以解釋這背后的概念或告訴我我是否完全錯(cuò)了?

                  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,一個(gè)使用瀏覽器的用戶
                  • Bob,擁有網(wǎng)站的網(wǎng)站所有者
                  • Mallory,一個(gè)擁有網(wǎng)站的惡意網(wǎng)站所有者

                  Alice 在 Bob 的服務(wù)器上有一個(gè)帳戶.也許是她的網(wǎng)絡(luò)郵件.也許是她的網(wǎng)上銀行.也許這是她喜歡購(gòu)物的地方.

                  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 的網(wǎng)站,卻不知道它是邪惡的.

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

                  同源政策阻止 Mallory 的網(wǎng)站使用 JavaScript 告訴 Alice 的瀏覽器向 Bob 的網(wǎng)站發(fā)出請(qǐng)求,并將 Alice 的個(gè)人信息(例如她的銀行余額)提供給 Mallory 的網(wǎng)站(因此也提供給 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).

                  (有時(shí)請(qǐng)求會(huì)被阻止,因?yàn)闂l件需要飛行前請(qǐng)求,其他時(shí)候請(qǐng)求會(huì)通過,但不會(huì)將響應(yīng)提供給 Mallory 的站點(diǎn).如果您想防御攻擊,請(qǐng)查找 CSRF危險(xiǎn)在于服務(wù)器在收到請(qǐng)求時(shí)所做的事情,而不是響應(yīng)中泄漏的信息).

                  (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 說他網(wǎng)站上的資源不包含任何個(gè)人信息,因此允許其他網(wǎng)站訪問它是安全的(或者可以信任特定網(wǎng)站的個(gè)人信息).

                  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).

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

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

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

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

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

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(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 無法加載,請(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))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                    <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="p7ayxrl" id='i4M9w'><tfoot id='i4M9w'></tfoot><dl id='i4M9w'><fieldset id='i4M9w'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 山东活动策划|济南活动公司|济南公关活动策划-济南锐嘉广告有限公司 | ALC墙板_ALC轻质隔墙板_隔音防火墙板_轻质隔墙材料-湖北博悦佳 | 磁力链接搜索神器_BT磁力狗_CILIMAO磁力猫_高效磁力搜索引擎2024 | 等离子表面处理机-等离子表面活化机-真空等离子清洗机-深圳市东信高科自动化设备有限公司 | 炒货机-炒菜机-炒酱机-炒米机@霍氏机械| 诸城网站建设-网络推广-网站优化-阿里巴巴托管-诸城恒泰互联 | 紧急切断阀_气动切断阀_不锈钢阀门_截止阀_球阀_蝶阀_闸阀-上海上兆阀门制造有限公司 | 馋嘴餐饮网_餐饮加盟店火爆好项目_餐饮连锁品牌加盟指南创业平台 | 北京乾茂兴业科技发展有限公司 | 蜂蜜瓶-玻璃瓶-玻璃瓶厂-玻璃瓶生产厂家-徐州贵邦玻璃制品有限公司 | 机床主轴维修|刀塔维修|C轴维修-常州翔高精密机械有限公司 | 空气能采暖,热泵烘干机,空气源热水机组|设备|厂家,东莞高温热泵_正旭新能源 | 中药超微粉碎机(中药细胞级微粉碎)-百科 | 铝单板_铝窗花_铝单板厂家_氟碳包柱铝单板批发价格-佛山科阳金属 | 100_150_200_250_300_350_400公斤压力空气压缩机-舰艇航天配套厂家 | 浙江红酒库-冰雕库-气调库-茶叶库安装-医药疫苗冷库-食品物流恒温恒湿车间-杭州领顺实业有限公司 | 低噪声电流前置放大器-SR570电流前置放大器-深圳市嘉士达精密仪器有限公司 | nalgene洗瓶,nalgene量筒,nalgene窄口瓶,nalgene放水口大瓶,浙江省nalgene代理-杭州雷琪实验器材有限公司 | 防潮防水通风密闭门源头实力厂家 - 北京酷思帝克门窗 | 无锡网站建设_小程序制作_网站设计公司_无锡网络公司_网站制作 | 防渗膜厂家|养殖防渗膜|水产养殖防渗膜-泰安佳路通工程材料有限公司 | 上海地磅秤|电子地上衡|防爆地磅_上海地磅秤厂家–越衡称重 | 螺旋绞龙叶片,螺旋输送机厂家,山东螺旋输送机-淄博长江机械制造有限公司 | 天津仓库出租网-天津电商仓库-天津云仓一件代发-【博程云仓】 | 湖南印刷厂|长沙印刷公司|画册印刷|挂历印刷|台历印刷|杂志印刷-乐成印刷 | 德州网站制作 - 网站建设设计 - seo排名优化 -「两山建站」 | 超声波气象站_防爆气象站_空气质量监测站_负氧离子检测仪-风途物联网 | Eiafans.com_环评爱好者 环评网|环评论坛|环评报告公示网|竣工环保验收公示网|环保验收报告公示网|环保自主验收公示|环评公示网|环保公示网|注册环评工程师|环境影响评价|环评师|规划环评|环评报告|环评考试网|环评论坛 - Powered by Discuz! | 结晶点测定仪-润滑脂滴点测定仪-大连煜烁| 蓝莓施肥机,智能施肥机,自动施肥机,水肥一体化项目,水肥一体机厂家,小型施肥机,圣大节水,滴灌施工方案,山东圣大节水科技有限公司官网17864474793 | 长江船运_国内海运_内贸船运_大件海运|运输_船舶运输价格_钢材船运_内河运输_风电甲板船_游艇运输_航运货代电话_上海交航船运 | 船用泵,船用离心泵,船用喷射泵,泰州隆华船舶设备有限公司 | 杭州货架订做_组合货架公司_货位式货架_贯通式_重型仓储_工厂货架_货架销售厂家_杭州永诚货架有限公司 | 旋振筛|圆形摇摆筛|直线振动筛|滚筒筛|压榨机|河南天众机械设备有限公司 | 100国际学校招生 - 专业国际学校择校升学规划 | 台式恒温摇床价格_大容量恒温摇床厂家-上海量壹科学仪器有限公司 | 北京租车公司_汽车/客车/班车/大巴车租赁_商务会议/展会用车/旅游大巴出租_北京桐顺创业租车公司 | 工业车间焊接-整体|集中除尘设备-激光|等离子切割机配套除尘-粉尘烟尘净化治理厂家-山东美蓝环保科技有限公司 | 重庆钣金加工厂家首页-专业定做监控电视墙_操作台 | 滑板场地施工_极限运动场地设计_滑板公园建造_盐城天人极限运动场地建设有限公司 | 金属回收_废铜废铁回收_边角料回收_废不锈钢回收_废旧电缆线回收-广东益夫金属回收公司 |