跨域问题解决has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple va

查看报错信息

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”标头包含多个 值'*,*',但只
允许一个。

跨域问题解决has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple va_第1张图片
这是多个模块之间的访问被阻止,需要加个跨域条件。
在项目中的Controller
没有这个的加上即可,
跨域问题解决has been blocked by CORS policy: The ‘Access-Control-Allow-Origin‘ header contains multiple va_第2张图片

你可能感兴趣的:(JAVA,java,python,mysql,vue,intellij,idea)