Browse Source

modules/setting: set default session GC interval to 3600s

pull/4017/merge
Unknwon 8 years ago
parent
commit
3b94162803
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 5
      .gitattributes
  2. 4
      conf/app.ini
  3. 452
      modules/bindata/bindata.go
  4. 2
      modules/setting/setting.go

5
.gitattributes vendored

@ -1,8 +1,7 @@
public/conf/gitignore/* linguist-vendored conf/gitignore/* linguist-vendored
public/conf/license/* linguist-vendored conf/license/* linguist-vendored
public/assets/* linguist-vendored public/assets/* linguist-vendored
public/plugins/* linguist-vendored public/plugins/* linguist-vendored
public/plugins/* linguist-vendored
public/css/themes/* linguist-vendored public/css/themes/* linguist-vendored
public/css/github.min.css linguist-vendored public/css/github.min.css linguist-vendored
public/css/semantic-2.2.7.min.css linguist-vendored public/css/semantic-2.2.7.min.css linguist-vendored

4
conf/app.ini

@ -271,8 +271,8 @@ COOKIE_NAME = i_like_gogits
COOKIE_SECURE = false COOKIE_SECURE = false
; Enable set cookie, default is true ; Enable set cookie, default is true
ENABLE_SET_COOKIE = true ENABLE_SET_COOKIE = true
; Session GC time interval, default is 86400 ; Session GC time interval, default is 3600
GC_INTERVAL_TIME = 86400 GC_INTERVAL_TIME = 3600
; Session life time, default is 86400 ; Session life time, default is 86400
SESSION_LIFE_TIME = 86400 SESSION_LIFE_TIME = 86400
; Cookie name for CSRF ; Cookie name for CSRF

452
modules/bindata/bindata.go

File diff suppressed because one or more lines are too long

2
modules/setting/setting.go

@ -773,7 +773,7 @@ func newSessionService() {
SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gogits") SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gogits")
SessionConfig.CookiePath = AppSubUrl SessionConfig.CookiePath = AppSubUrl
SessionConfig.Secure = Cfg.Section("session").Key("COOKIE_SECURE").MustBool() SessionConfig.Secure = Cfg.Section("session").Key("COOKIE_SECURE").MustBool()
SessionConfig.Gclifetime = Cfg.Section("session").Key("GC_INTERVAL_TIME").MustInt64(86400) SessionConfig.Gclifetime = Cfg.Section("session").Key("GC_INTERVAL_TIME").MustInt64(3600)
SessionConfig.Maxlifetime = Cfg.Section("session").Key("SESSION_LIFE_TIME").MustInt64(86400) SessionConfig.Maxlifetime = Cfg.Section("session").Key("SESSION_LIFE_TIME").MustInt64(86400)
CSRFCookieName = Cfg.Section("session").Key("CSRF_COOKIE_NAME").MustString("_csrf") CSRFCookieName = Cfg.Section("session").Key("CSRF_COOKIE_NAME").MustString("_csrf")

Loading…
Cancel
Save