跨域问题解决has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple va
Access to XMLHttpRequest at 'http://localhost:8222/eduservice/indexfront/index' from origin 'http://localhost:3000' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains m
·
查看报错信息
Access to XMLHttpRequest at
'http://localhost:8222/eduservice/in
dexfront/index' from origin
'http://localhost:3000' has been
blocked by CORS policy: The 'Access-
Control-Allow-Origin' header
contains multiple values '*, *', but
only one is allowed.
通过CORS策略已阻止从源“ http://
localhost:3000”访问“ http://
localhost:8222 / eduservice /
indexfront / index”处的
XMLHttpRequest:“ Access-Control-
Allow-Origin”标头包含多个 值'*,*',但只
允许一个。
这是多个模块之间的访问被阻止,需要加个跨域条件。
在项目中的Controller
没有这个的加上即可,
更多推荐
已为社区贡献6条内容
所有评论(0)