我无法让Cors中间件在我的Node.js应用程序中运行

时间:2017-09-03 17:13:55

标签: javascript node.js express cors

我正在尝试使用Cors middleware,但它无效

我按照文档中的简单说明操作,但我仍然遇到这个可怕的错误。

strong

任何人都可以帮助我吗?这是我的后端API的index.js文件,我尝试在其中实现中间件。

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63342' is therefore not allowed access.

有人可以帮忙吗?我错过了什么吗?

0 个答案:

没有答案