summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authortechknowlogick <matti@mdranta.net>2019-02-05 11:52:51 -0500
committerGitHub <noreply@github.com>2019-02-05 11:52:51 -0500
commit9de871a0f8911030f8e06a881803cf722b8798ea (patch)
tree206400f0a5873d7d078fcdd004956036f07a1db5 /modules/setting/setting.go
parentbf4badad1d68c18d7ffb92c69e09e4e8aa252935 (diff)
downloadgitea-9de871a0f8911030f8e06a881803cf722b8798ea.tar.gz
gitea-9de871a0f8911030f8e06a881803cf722b8798ea.zip
add other session providers (#5963)
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index a2fdbf5192..77f0725d00 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -31,7 +31,12 @@ import (
_ "github.com/go-macaron/cache/memcache" // memcache plugin for cache
_ "github.com/go-macaron/cache/redis"
"github.com/go-macaron/session"
- _ "github.com/go-macaron/session/redis" // redis plugin for store session
+ _ "github.com/go-macaron/session/couchbase" // couchbase plugin for session store
+ _ "github.com/go-macaron/session/memcache" // memcache plugin for session store
+ _ "github.com/go-macaron/session/mysql" // mysql plugin for session store
+ _ "github.com/go-macaron/session/nodb" // nodb plugin for session store
+ _ "github.com/go-macaron/session/postgres" // postgres plugin for session store
+ _ "github.com/go-macaron/session/redis" // redis plugin for store session
"github.com/go-xorm/core"
shellquote "github.com/kballard/go-shellquote"
version "github.com/mcuadros/go-version"
@@ -1506,7 +1511,7 @@ func newCacheService() {
func newSessionService() {
SessionConfig.Provider = Cfg.Section("session").Key("PROVIDER").In("memory",
- []string{"memory", "file", "redis", "mysql"})
+ []string{"memory", "file", "redis", "mysql", "postgres", "couchbase", "memcache", "nodb"})
SessionConfig.ProviderConfig = strings.Trim(Cfg.Section("session").Key("PROVIDER_CONFIG").MustString(path.Join(AppDataPath, "sessions")), "\" ")
if SessionConfig.Provider == "file" && !filepath.IsAbs(SessionConfig.ProviderConfig) {
SessionConfig.ProviderConfig = path.Join(AppWorkPath, SessionConfig.ProviderConfig)