SpringCloud Gateway报错“When allowCredentials is true, allowedOrigins cannot contain the special ....”
关于SpringCloud gateway写了allowCredentials之后报错的解决办法
·
SpringCloud Gateway报错
"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."
意思就是,写了allowCredentials :true
之后,就不能用allowedOrigins : "*"
,换成allowedOriginPatterns : "*"
即可
更多推荐
已为社区贡献2条内容
所有评论(0)