Access to XMLHttpRequest at 'API_URL' from origin 'http://localhost:8080' has been blocked by CORS policy:

后端 未结 3 2622
鱼传尺愫
鱼传尺愫 2021-02-20 08:33

Access to XMLHttpRequest at \'API_URL\' from origin \'http://localhost:8080\' has been blocked by CORS policy: Response to preflight request doesn\'t pass a

3条回答
  •  自闭症患者
    2021-02-20 09:16

    you need to enable cross-origin resource in your API, so that it can be accessed from localhost as caller.

    More info here https://enable-cors.org/server.html and here https://www.html5rocks.com/en/tutorials/cors/

提交回复
热议问题