mirror of https://github.com/jumpserver/jumpserver
[Update] 浏览器会话火气时间
parent
c4d6f32528
commit
67f52888f6
|
@ -310,6 +310,7 @@ defaults = {
|
|||
'SESSION_COOKIE_DOMAIN': None,
|
||||
'CSRF_COOKIE_DOMAIN': None,
|
||||
'SESSION_COOKIE_AGE': 3600 * 24,
|
||||
'SESSION_EXPIRE_AT_BROWSER_CLOSE': False,
|
||||
'AUTH_OPENID': False,
|
||||
'EMAIL_SUFFIX': 'jumpserver.org'
|
||||
}
|
||||
|
|
|
@ -146,6 +146,7 @@ LOGIN_URL = reverse_lazy('users:login')
|
|||
SESSION_COOKIE_DOMAIN = CONFIG.SESSION_COOKIE_DOMAIN
|
||||
CSRF_COOKIE_DOMAIN = CONFIG.CSRF_COOKIE_DOMAIN
|
||||
SESSION_COOKIE_AGE = CONFIG.SESSION_COOKIE_AGE
|
||||
SESSION_EXPIRE_AT_BROWSER_CLOSE = CONFIG.SESSION_EXPIRE_AT_BROWSER_CLOSE
|
||||
|
||||
MESSAGE_STORAGE = 'django.contrib.messages.storage.cookie.CookieStorage'
|
||||
# Database
|
||||
|
|
|
@ -44,6 +44,11 @@ class Config:
|
|||
# LOG_LEVEL = 'DEBUG'
|
||||
# LOG_DIR = os.path.join(BASE_DIR, 'logs')
|
||||
|
||||
# Session expiration setting, Default 24 hour, Also set expired on on browser close
|
||||
# 浏览器Session过期时间,默认24小时, 也可以设置浏览器关闭则过期
|
||||
# SESSION_COOKIE_AGE = 3600 * 24
|
||||
# SESSION_EXPIRE_AT_BROWSER_CLOSE = False
|
||||
|
||||
# Database setting, Support sqlite3, mysql, postgres ....
|
||||
# 数据库设置
|
||||
# See https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
||||
|
|
Loading…
Reference in New Issue