mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:30:54 +00:00
Update beego.go
This commit is contained in:
parent
844412c302
commit
afadb3f6df
3
beego.go
3
beego.go
@ -192,6 +192,7 @@ func Run() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if SessionOn {
|
if SessionOn {
|
||||||
|
var err error
|
||||||
sessionConfig := AppConfig.String("sessionConfig")
|
sessionConfig := AppConfig.String("sessionConfig")
|
||||||
if sessionConfig == "" {
|
if sessionConfig == "" {
|
||||||
sessionConfig = `{"cookieName":"` + SessionName + `",` +
|
sessionConfig = `{"cookieName":"` + SessionName + `",` +
|
||||||
@ -203,7 +204,7 @@ func Run() {
|
|||||||
`"enableSetCookie":` + strconv.FormatBool(SessionAutoSetCookie) + `,` +
|
`"enableSetCookie":` + strconv.FormatBool(SessionAutoSetCookie) + `,` +
|
||||||
`"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `}`
|
`"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `}`
|
||||||
}
|
}
|
||||||
GlobalSessions, err := session.NewManager(SessionProvider,
|
GlobalSessions, err = session.NewManager(SessionProvider,
|
||||||
sessionConfig)
|
sessionConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user