为了账号安全,请及时绑定邮箱和手机立即绑定

@CrossOrigin(allowCredentials = "true", allowedHeaders = "*")

CrossOrigin注解加上这两个参数,会报以下的错误:

When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header

正在回答

2 回答

@CrossOrigin(origins = {" * "}, allowedHeaders="*")


0 回复 有任何疑惑可以回复我~

添加

originPatterns = "*"


2 回复 有任何疑惑可以回复我~
#1

MZ11123

谢谢你
2022-07-26 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

@CrossOrigin(allowCredentials = "true", allowedHeaders = "*")

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信