Skip to content

Commit 9de871a

Browse files
add other session providers (#5963)
1 parent bf4bada commit 9de871a

File tree

160 files changed

+37644
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+37644
-66
lines changed

Gopkg.lock

Lines changed: 109 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
250250

251251
## Session (`session`)
252252

253-
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, mysql\].
253+
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, mysql, couchbase, memcache, nodb, postgres\].
254254
- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for others, the connection string.
255255
- `COOKIE_SECURE`: **false**: Enable this to force using HTTPS for all session access.
256256
- `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID.

modules/setting/setting.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ import (
3131
_ "github.com/go-macaron/cache/memcache" // memcache plugin for cache
3232
_ "github.com/go-macaron/cache/redis"
3333
"github.com/go-macaron/session"
34-
_ "github.com/go-macaron/session/redis" // redis plugin for store session
34+
_ "github.com/go-macaron/session/couchbase" // couchbase plugin for session store
35+
_ "github.com/go-macaron/session/memcache" // memcache plugin for session store
36+
_ "github.com/go-macaron/session/mysql" // mysql plugin for session store
37+
_ "github.com/go-macaron/session/nodb" // nodb plugin for session store
38+
_ "github.com/go-macaron/session/postgres" // postgres plugin for session store
39+
_ "github.com/go-macaron/session/redis" // redis plugin for store session
3540
"github.com/go-xorm/core"
3641
shellquote "github.com/kballard/go-shellquote"
3742
version "github.com/mcuadros/go-version"
@@ -1506,7 +1511,7 @@ func newCacheService() {
15061511

15071512
func newSessionService() {
15081513
SessionConfig.Provider = Cfg.Section("session").Key("PROVIDER").In("memory",
1509-
[]string{"memory", "file", "redis", "mysql"})
1514+
[]string{"memory", "file", "redis", "mysql", "postgres", "couchbase", "memcache", "nodb"})
15101515
SessionConfig.ProviderConfig = strings.Trim(Cfg.Section("session").Key("PROVIDER_CONFIG").MustString(path.Join(AppDataPath, "sessions")), "\" ")
15111516
if SessionConfig.Provider == "file" && !filepath.IsAbs(SessionConfig.ProviderConfig) {
15121517
SessionConfig.ProviderConfig = path.Join(AppWorkPath, SessionConfig.ProviderConfig)

vendor/github.com/BurntSushi/toml/COPYING

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/BurntSushi/toml/cmd/tomlv/COPYING

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)