mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-03 05:21:38 +01:00
Merge pull request #5648 from ywk253100/180817_session
Fix "gob: name not registered for interface" error
This commit is contained in:
commit
257a728086
@ -15,6 +15,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/gob"
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
@ -77,6 +78,7 @@ func main() {
|
||||
//TODO
|
||||
redisURL := os.Getenv("_REDIS_URL")
|
||||
if len(redisURL) > 0 {
|
||||
gob.Register(models.User{})
|
||||
beego.BConfig.WebConfig.Session.SessionProvider = "redis"
|
||||
beego.BConfig.WebConfig.Session.SessionProviderConfig = redisURL
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user