我已经在Chrome中运行了我的项目,但是我已经成功运行了 Firefox中的项目显示错误。
我在火狐中运行项目并且登录无法正常显示错误
Angular正在开发模式下运行。调用enableProdMode()以启用生产模式。 跨源请求已阻止:同源策略禁止在http://localhost/Invitation/code读取远程资源。 (原因:在CORS预检频道的CORS标题'Access-Control-Allow-Headers'中遗漏了令牌'content-type'。)
所以请尽快给出解决方案
答案 0 :(得分:0)
您需要在后端实现CORS。请实施CORS passthrough(因为它在本地)。如果您的后备人员处于弹簧框架中,那么您可以在此处查看https://spring.io/guides/gs/rest-service-cors/