Browse Source

Mirror bug fix

pull/494/head
Unknwon 10 years ago
parent
commit
b72d7c201a
  1. 1
      cmd/web.go
  2. 1
      modules/setting/setting.go

1
cmd/web.go

@ -100,6 +100,7 @@ func newMacaron() *macaron.Macaron {
Secret: setting.SecretKey, Secret: setting.SecretKey,
SetCookie: true, SetCookie: true,
Header: "X-Csrf-Token", Header: "X-Csrf-Token",
CookiePath: setting.AppSubUrl,
})) }))
m.Use(toolbox.Toolboxer(m, toolbox.Options{ m.Use(toolbox.Toolboxer(m, toolbox.Options{
HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{ HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{

1
modules/setting/setting.go

@ -380,6 +380,7 @@ func newSessionService() {
SessionConfig = new(session.Config) SessionConfig = new(session.Config)
SessionConfig.ProviderConfig = strings.Trim(Cfg.MustValue("session", "PROVIDER_CONFIG"), "\" ") SessionConfig.ProviderConfig = strings.Trim(Cfg.MustValue("session", "PROVIDER_CONFIG"), "\" ")
SessionConfig.CookieName = Cfg.MustValue("session", "COOKIE_NAME", "i_like_gogits") SessionConfig.CookieName = Cfg.MustValue("session", "COOKIE_NAME", "i_like_gogits")
SessionConfig.CookiePath = AppSubUrl
SessionConfig.Secure = Cfg.MustBool("session", "COOKIE_SECURE") SessionConfig.Secure = Cfg.MustBool("session", "COOKIE_SECURE")
SessionConfig.EnableSetCookie = Cfg.MustBool("session", "ENABLE_SET_COOKIE", true) SessionConfig.EnableSetCookie = Cfg.MustBool("session", "ENABLE_SET_COOKIE", true)
SessionConfig.Gclifetime = Cfg.MustInt64("session", "GC_INTERVAL_TIME", 86400) SessionConfig.Gclifetime = Cfg.MustInt64("session", "GC_INTERVAL_TIME", 86400)

Loading…
Cancel
Save