Bladeren bron

cookie domain作用域

storyxc 2 jaren geleden
bovenliggende
commit
d10185d659

+ 4 - 4
superdesk-libs-security/src/main/java/cn/superdesk/libs/security/SecuritySessionManager.java

@@ -104,11 +104,11 @@ public class SecuritySessionManager {
 
 
     private Cookie createSessionCookies(HttpServletRequest request, String sessionId, int expire) {
-        if (cookieDomain == null) {
-            cookieDomain = WebUtils.getRootDomain(request);
-        }
+        //if (cookieDomain == null) {
+        String   cookieDomainTmp = WebUtils.getRootDomain(request);
+        //}
         Cookie cookie = new Cookie(sessionIdName, sessionId);
-        cookie.setDomain(cookieDomain);
+        cookie.setDomain(cookieDomainTmp);
         cookie.setPath("/");
         cookie.setHttpOnly(true);
         //if (expire == 0 || !keepCookie) {