hjb1998
V2EX  ›  问与答

求助一个关于百度云加速跨域的问题

  •  
  •   hjb1998 · Mar 20, 2021 · 807 views
    This topic created in 1897 days ago, the information mentioned may be changed or developed.

    源站的跨域设置: add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS"; add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept"; 不使用 cdn 正常

    用了百度云加速之后,只要是 xhr 请求,响应头里就没有上面设置的 header,导致跨域错误; 其他请求又是正常的,有这些 header

    换别的 cdn 也是正常的,就百度云加速的 xhr 不行,百度云加速也没找到哪里有跨域设置= =

    hjb1998
        1
    hjb1998  
    OP
       Mar 20, 2021
    找了百度客服,回复说请求头暂时不支持设置。。。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2759 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 04:32 · PVG 12:32 · LAX 21:32 · JFK 00:32
    ♥ Do have faith in what you're doing.