Localhost Cookie域

时间:2019-06-05 17:04:46

标签: spring http cookies cross-origin-read-blocking

我正在研究Java Spring MVC应用程序,该应用程序使用CAS对用户进行身份验证,然后生成JWT。将该令牌添加到Cookie中,然后将用户重定向到本地运行的另一个应用程序。 Spring应用程序的URL为 function displayBoxes() { let option = document.querySelector('#select'); let boxes = document.querySelectorAll('div'); boxes.forEach(function(el) { el.classList.add('d-none'); }); document.querySelector('.box' + option.options[option.selectedIndex].value).classList.remove('.d-none'); } 。用户重定向到的另一个应用程序位于http://localhost:8080/Authentication/。我的问题是为什么http://localhost:52554/上没有cookie?由于两个应用程序都在本地主机中运行,因此它们都在同一域中运行。我验证了令牌cookie已设置为http://localhost:52554/。重定向到http://localhost:8080/Authentication/后,cookie消失了。感谢您的帮助。

0 个答案:

没有答案