mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 20:51:29 +00:00
fix #453
This commit is contained in:
parent
299cb9130b
commit
844412c302
15
beego.go
15
beego.go
@ -194,17 +194,20 @@ func Run() {
|
||||
if SessionOn {
|
||||
sessionConfig := AppConfig.String("sessionConfig")
|
||||
if sessionConfig == "" {
|
||||
sessionConfig = `{"cookieName":` + SessionName + `,` +
|
||||
sessionConfig = `{"cookieName":"` + SessionName + `",` +
|
||||
`"gclifetime":` + strconv.FormatInt(SessionGCMaxLifetime, 10) + `,` +
|
||||
`"providerConfig":` + SessionSavePath + `,` +
|
||||
`"providerConfig":"` + SessionSavePath + `",` +
|
||||
`"secure":` + strconv.FormatBool(HttpTLS) + `,` +
|
||||
`"sessionIDHashFunc":` + SessionHashFunc + `,` +
|
||||
`"sessionIDHashKey":` + SessionHashKey + `,` +
|
||||
`"sessionIDHashFunc":"` + SessionHashFunc + `",` +
|
||||
`"sessionIDHashKey":"` + SessionHashKey + `",` +
|
||||
`"enableSetCookie":` + strconv.FormatBool(SessionAutoSetCookie) + `,` +
|
||||
`"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `,}`
|
||||
`"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `}`
|
||||
}
|
||||
GlobalSessions, _ = session.NewManager(SessionProvider,
|
||||
GlobalSessions, err := session.NewManager(SessionProvider,
|
||||
sessionConfig)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
go GlobalSessions.GC()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user