We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在本地做调试时,发现无法自带cookie,在服务器上,也就是测试环境没有存在这个问题,比较奇怪,代码都一直的。 浏览器没有报错,也没有说跨域什么的报错,看请求头直接就不带cookie,登录接口都没问题的,登录是不需要带cookie请求的,也就是说跨域不存在问题,仅仅是请求头不携带cookie。 本地打开的页面域名是:http://localhost:9528 API的域名是:http://tenantapi.cn API和web端都是一个电脑运行的。一直没找到具体的原因, #562 看过了没有任何帮助。 后端配置: Access-Control-Allow-Origin: http://localhost:9528 Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: Cache-Control, Content-Type, Authorization, X-Requested-With, Env, Cookie 前端配置: withCredentials: true
The text was updated successfully, but these errors were encountered:
已解决,还是因为chrome 版本问题,本地被禁用了,解决办法如下: 在Chrome中访问chrome://flags/,搜索SameSite by default cookies并设置为disabled即可。
Sorry, something went wrong.
No branches or pull requests
在本地做调试时,发现无法自带cookie,在服务器上,也就是测试环境没有存在这个问题,比较奇怪,代码都一直的。
浏览器没有报错,也没有说跨域什么的报错,看请求头直接就不带cookie,登录接口都没问题的,登录是不需要带cookie请求的,也就是说跨域不存在问题,仅仅是请求头不携带cookie。
本地打开的页面域名是:http://localhost:9528
API的域名是:http://tenantapi.cn
API和web端都是一个电脑运行的。一直没找到具体的原因, #562 看过了没有任何帮助。
后端配置:
Access-Control-Allow-Origin: http://localhost:9528
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Cache-Control, Content-Type, Authorization, X-Requested-With, Env, Cookie
前端配置:
withCredentials: true
The text was updated successfully, but these errors were encountered: