Browse Source

fix redis cache failed (#3086)

Lunny Xiao 2 years ago
parent
commit
2738effddf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/setting/setting.go

+ 1 - 1
modules/setting/setting.go

@@ -1399,7 +1399,7 @@ func newSessionService() {
1399 1399
 	SessionConfig.Provider = Cfg.Section("session").Key("PROVIDER").In("memory",
1400 1400
 		[]string{"memory", "file", "redis", "mysql"})
1401 1401
 	SessionConfig.ProviderConfig = strings.Trim(Cfg.Section("session").Key("PROVIDER_CONFIG").MustString(path.Join(AppDataPath, "sessions")), "\" ")
1402
-	if !filepath.IsAbs(SessionConfig.ProviderConfig) {
1402
+	if SessionConfig.Provider == "file" && !filepath.IsAbs(SessionConfig.ProviderConfig) {
1403 1403
 		SessionConfig.ProviderConfig = path.Join(AppWorkPath, SessionConfig.ProviderConfig)
1404 1404
 	}
1405 1405
 	SessionConfig.CookieName = Cfg.Section("session").Key("COOKIE_NAME").MustString("i_like_gitea")