我目前正在遇到来自sails API端点的响应的CORS原因问题。我已经在security.js文件中设置了allowRoutes: true and allowOrigin: "*"
个选项,但我仍然得到了Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
我做错了什么?
答案 0 :(得分:1)
将Access-Control-Allow-Origin
添加到config / cors.js的headers