网关转发会导致跨域吗? - V2EX
rationa1cuzz

网关转发会导致跨域吗?

  •  
  •   rationa1cuzz Aug 4, 2021 2099 views
    This topic created in 1766 days ago, the information mentioned may be changed or developed.
    有线网跨域
    无线网不跨域,不同网段
    11 replies    2021-08-05 10:51:55 +08:00
    dushixiang
        1
    dushixiang  
       Aug 4, 2021
    跨域和这个没有任何关系。跨域产生的原因:出于安全性,浏览器限制脚本内发起的跨源 HTTP 请求。
    rationa1cuzz
        2
    rationa1cuzz  
    OP
       Aug 4, 2021
    @FreeEx 这个我知道,本质是浏览器不允许,我同一个网站无线网 192.168.4.11 正常访问,有线 192.168.5.101 不行,同一个网络不通网段
    juzipeek
        3
    juzipeek  
       Aug 4, 2021
    是不是增加了响应头
    mxT52CRuqR6o5
        4
    mxT52CRuqR6o5  
       Aug 4, 2021
    我感觉你描述的东西可能不叫跨域
    wellsc
        5
    wellsc  
       Aug 4, 2021
    xingyue
        6
    xingyue  
       Aug 4, 2021 via Android
    访问的页面地址是?提示跨域的接口地址是?
    rationa1cuzz
        7
    rationa1cuzz  
    OP
       Aug 5, 2021
    @mxT52CRuqR6o5
    @xingyue
    Access to XMLHttpRequest at ’http:ZZ192.168.101.lZpisa :xxxx/#Zlogin:1 ble/disable.htm?url type-%ETO^BFEE§%57&E%F7%roj$99/%49%50%E7%AB%99%E7%8 2%B9&plc name=%E6%99%AE%E9%80%9A%E5%91%98%E5%B7%A5' (redirected from ’htt p://xxxxxx/') from origin * http://xxxxx has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    GET http://192.168.101.lZdisableZdisable.ht chunk-vendors.0731f280.js:189 m?url type=%E8%AE%BF%E9%97%AE%E7%BD%.J99/%49%50%E7%AB%99%E7%82%B9&plc name=% E6%99%AE%E9%80%9A%E5%91%98%E5%B7%A5 net::ERR_FAILED
    rationa1cuzz
        8
    rationa1cuzz  
    OP
       Aug 5, 2021
    @wellsc 为什么啊?
    @juzipeek 代码并没有做特殊处理
    waiaan
        9
    waiaan  
       Aug 5, 2021
    @rationa1cuzz
    跨域的话浏览器会有提示,你的不能正常访问是怎么样的?
    mxT52CRuqR6o5
        10
    mxT52CRuqR6o5  
       Aug 5, 2021
    @rationa1cuzz 看上去有些请求是写死 host 的,而不是请求当前访问的域名,尝试转发时对 body 全局替换字符串
    rationa1cuzz
        11
    rationa1cuzz  
    OP
       Aug 5, 2021
    @waiaan 7 楼
    @mxT52CRuqR6o5 都是直接访问 ip 的
    About     Help     Advertise     Blog     API     FAQ     Solana     1068 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 41ms UTC 18:25 PVG 02:25 LAX 11:25 JFK 14:25
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86