V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
rationa1cuzz
V2EX  ›  程序员

咨询一个网络问题

  •  
  •   rationa1cuzz · 2021-08-04 15:39:56 +08:00 · 1227 次点击
    这是一个创建于 1000 天前的主题,其中的信息可能已经有所发展或是发生改变。

    公司有线网访问外网 ip(例如 22.22.22.223),post 请求会引发跨域,

    ►Access to XMLHttpRequest at ’http:ZZ192.168.101.lZpisa :xxxx/#Zlogin:1 ble/disable.htm?url type-%ETO^BFEE§%57&E%F7%ro£j$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%.J»99/%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

    get 没问题,但是无线网不会出问题。同时热点访问该外网 ip 没有任何问题。

    3 条回复    2021-08-04 17:37:24 +08:00
    rationa1cuzz
        1
    rationa1cuzz  
    OP
       2021-08-04 15:51:46 +08:00
    补充一下 <br>
    有线,192.168.101.16 网关 192.168.101.1 <br>
    无线,192.168.102.32 网关 192.168.102.1 <br>
    SmiteChow
        2
    SmiteChow  
       2021-08-04 17:27:44 +08:00
    跨域是事实,引发的是错误,错误原因解决方法消息中已经明确了,建议细读。
    rationa1cuzz
        3
    rationa1cuzz  
    OP
       2021-08-04 17:37:24 +08:00
    @SmiteChow 我很好奇为什么同一个网络不同网段 192.168.4.10 192.168.101.3 访问同一个外网 ip 结果不一样
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2631 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 11:07 · PVG 19:07 · LAX 04:07 · JFK 07:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.