e8f5c104 by slene

Merge pull request #457 from luxuchu/patch-1

fix #453
2 parents 8d79f838 afadb3f6
Showing 1 changed file with 2 additions and 1 deletions
...@@ -192,6 +192,7 @@ func Run() { ...@@ -192,6 +192,7 @@ func Run() {
192 } 192 }
193 193
194 if SessionOn { 194 if SessionOn {
195 var err error
195 sessionConfig := AppConfig.String("sessionConfig") 196 sessionConfig := AppConfig.String("sessionConfig")
196 if sessionConfig == "" { 197 if sessionConfig == "" {
197 sessionConfig = `{"cookieName":"` + SessionName + `",` + 198 sessionConfig = `{"cookieName":"` + SessionName + `",` +
...@@ -203,7 +204,7 @@ func Run() { ...@@ -203,7 +204,7 @@ func Run() {
203 `"enableSetCookie":` + strconv.FormatBool(SessionAutoSetCookie) + `,` + 204 `"enableSetCookie":` + strconv.FormatBool(SessionAutoSetCookie) + `,` +
204 `"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `}` 205 `"cookieLifeTime":` + strconv.Itoa(SessionCookieLifeTime) + `}`
205 } 206 }
206 GlobalSessions, err := session.NewManager(SessionProvider, 207 GlobalSessions, err = session.NewManager(SessionProvider,
207 sessionConfig) 208 sessionConfig)
208 if err != nil { 209 if err != nil {
209 panic(err) 210 panic(err)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!