fangwenxue
V2EX  ›  问与答

ajax 上传 cors 错误

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

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