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 相互覆盖而使请求出错。
The text was updated successfully, but these errors were encountered:
同域名不同path还能有不同的cookie?这是什么操作。。。比如我登录之后返回的用户cookie别的path还不能用了?
Sorry, something went wrong.
某公司的教务系统确实是这个样子……登录之后会有path=/的公共 Cookie。然后进入不同的页面的时候,服务器会根据页面所属模块的不同下发path=/module1、path=/module2之类的 Cookie。用path=/module1的 Cookie 去请求 module2 的页面会 403。 所以我只能将就着给SPCookieStore里的getCookieToken方法加上了path,然后返回指定 Url 的 Cookie 的时候用了一下cookie.matches(url)方法来判断,目前看起来这样好像能用,不过不知道会不会有其他问题。
path=/
path=/module1
path=/module2
SPCookieStore
getCookieToken
path
cookie.matches(url)
有可以测试的url地址吗?方便的话加群私聊发我一下 我这边修改之后测试测试
学校内部的网站,可能不太方便给
No branches or pull requests
看了一下源代码,Cookie 的存储机制是按照域名的,这样会导致同域名不同路径的 Cookie 相互覆盖而使请求出错。
The text was updated successfully, but these errors were encountered: