学无先后,达者为师

网站首页 编程语言 正文

credentials to a set of origins, list them explicitly or consider using “allowedOriginPatterns“

作者:饭饭m 更新时间: 2024-02-27 编程语言

在做gulimall项目时候

1、异常信息

Caused by: java.lang.IllegalArgumentException: When allowCredentials is true, allowedOrigins cannot contain the special value "*"since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.

2、解决方法

由于我的springcloud版本是2.1.0

         而renren-first后台管理系统的版本是2.6.6

版本的选择参考: 

b(18条消息) Spring Boot,Spring Cloud,Spring Cloud Alibaba 版本选择说明以及整理归纳_乐之终曲的博客-CSDN博客_springcloudalibaba版本 然后将报错的地方将 .allowedOriginPatterns("*")改为 allowedOrigins("*")

原文链接:https://blog.csdn.net/qq_41834086/article/details/125036233

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新