fangwenxue
V2EX  ›  问与答

ajax 上传 cors 错误

  •  
  •   fangwenxue · Oct 1, 2022 · 1589 views
    This topic created in 1346 days ago, the information mentioned may be changed or developed.

    • 服务端没有限制,为什么还出现 cors 错误
    5 replies    2022-10-01 14:42:34 +08:00
    momocraft
        1
    momocraft  
       Oct 1, 2022
    **preflight request**
    dayeye2006199
        2
    dayeye2006199  
       Oct 1, 2022
    看看 OPTIONS 的那个 request 返回有没有头文件
    fangwenxue
        3
    fangwenxue  
    OP
       Oct 1, 2022
    @dayeye2006199 返回了,服务器只支持 post
    而且 options 的请求吧上传的文件丢了
    cydysm
        4
    cydysm  
       Oct 1, 2022 via iPhone
    @fangwenxue 多看下 cors 相关
    options 请求只是预检请求
    fangwenxue
        5
    fangwenxue  
    OP
       Oct 1, 2022
    @cydysm 懂了,解决了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1467 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 16:52 · PVG 00:52 · LAX 09:52 · JFK 12:52
    ♥ Do have faith in what you're doing.