spring - 本地主机 Cookie 域
问题描述
我正在开发一个 Java Spring MVC 应用程序,该应用程序使用 CAS 对用户进行身份验证,然后生成 JWT。该令牌被添加到 cookie 中,然后用户被重定向到本地运行的另一个应用程序。Spring 应用程序的 url 是http://localhost:8080/Authentication/
. 用户被重定向到的另一个应用程序位于http://localhost:52554/
。我的问题是为什么 cookie 不可用http://localhost:52554/
?由于两个应用程序都在本地主机上运行,它们在同一个域上运行。我验证了令牌 cookie 设置为http://localhost:8080/Authentication/
. 重定向到 后http://localhost:52554/
,cookie 消失了。任何帮助在这里表示赞赏。
解决方案
推荐阅读
- flutter - 错误:“int”类型不是“Map”类型的子类型
'在颤抖中 - mysql - mysql 工作台中的 ROW_NUMBER()
- javascript - 我可以在表单验证中使用参数吗?
- c++ - 如何让 Intellisense 在 Visual Studio 2019 中处理独立的 C++ 源文件?
- javascript - offsetHeight 和 scrollHeight 比较仅适用于 Angular 指令中的 setTimeout
- list - 如何在没有“并发修改”异常的情况下将所有列表项添加到另一个列表的每个项目
- tensorflow - 关于 Keras imagedatagenerator.flow(image, target) 中的目标会发生什么的问题
- php - 使用 readFile() 下载 zip 时总是出现“失败 - 网络错误”
- html - user-select:none 仍然是 Chrome 中复制的富文本的一部分
- macos - Docker 使用 25-35% CPU 而没有运行容器/应用程序 - 如何真正空闲?