Browse Source

修改cookie超时时间。

NorthLan 6 years ago
parent
commit
50b5461e0c

+ 2 - 1
zen-api/src/main/kotlin/com/gxzc/zen/umps/config/ShiroConfig.kt

@@ -118,13 +118,14 @@ class ShiroConfig {
     fun defaultWebSessionManager(): ZenWebSessionManager {
         return ZenWebSessionManager().apply {
             setCacheManager(redisCacheManager())
-            globalSessionTimeout = 1800000
+            globalSessionTimeout = 604800 * 1000
             isDeleteInvalidSessions = true
             isSessionValidationSchedulerEnabled = true
             isDeleteInvalidSessions = true
             sessionDAO = redisSessionDAO()
             sessionIdCookie = SimpleCookie(ZenHttpSession.DEFAULT_SESSION_ID_NAME).apply {
                 isHttpOnly = true
+                maxAge = 604800
             }
         }
     }

+ 2 - 2
zen-web/src/main/resources/application.yml

@@ -1,8 +1,8 @@
 spring:
   profiles:
     active: dev
-    include: orm-mycat-dev,rpc-dev,mq-dev,cache-dev,umps-dev,platform-dev,job-dev,upload-dev
-    # include: orm-mycat-prod,rpc-prod,mq-prod,cache-prod,umps-prod,platform-prod,job-prod,upload-prod
+#    include: orm-mycat-dev,rpc-dev,mq-dev,cache-dev,umps-dev,platform-dev,job-dev,upload-dev
+    include: orm-mycat-prod,rpc-prod,mq-prod,cache-prod,umps-prod,platform-prod,job-prod,upload-prod
 ---
 spring:
   profiles: dev