Deadly CORS when http://localhost is the origin

后端 未结 9 1448
迷失自我
迷失自我 2020-11-22 00:54

I am stuck with this CORS problem, even though I set the server (nginx/node.js) with the appropriate headers.

I can see in Chrome Network pane -> Response Headers:

9条回答
  •  猫巷女王i
    2020-11-22 01:40

    Chrome will make requests with CORS from a localhost origin just fine. This isn't a problem with Chrome.

    The reason you can't load http://stackoverflow.com is that the Access-Control-Allow-Origin headers weren't allowing your localhost origin.

提交回复
热议问题