mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Update session
This commit is contained in:
@ -41,19 +41,19 @@ var (
|
||||
Cfg *goconfig.ConfigFile
|
||||
MailService *Mailer
|
||||
|
||||
LogMode string
|
||||
LogConfig string
|
||||
|
||||
Cache cache.Cache
|
||||
CacheAdapter string
|
||||
CacheConfig string
|
||||
|
||||
PictureService string
|
||||
PictureRootPath string
|
||||
|
||||
LogMode string
|
||||
LogConfig string
|
||||
|
||||
SessionProvider string
|
||||
SessionConfig *session.Config
|
||||
SessionManager *session.Manager
|
||||
|
||||
PictureService string
|
||||
PictureRootPath string
|
||||
)
|
||||
|
||||
var Service struct {
|
||||
@ -182,6 +182,10 @@ func newSessionService() {
|
||||
SessionConfig.SessionIDHashFunc = Cfg.MustValue("session", "SESSION_ID_HASHFUNC", "sha1")
|
||||
SessionConfig.SessionIDHashKey = Cfg.MustValue("session", "SESSION_ID_HASHKEY")
|
||||
|
||||
if SessionProvider == "file" {
|
||||
os.MkdirAll(path.Dir(SessionConfig.ProviderConfig), os.ModePerm)
|
||||
}
|
||||
|
||||
var err error
|
||||
SessionManager, err = session.NewManager(SessionProvider, *SessionConfig)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user