mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Add: Unix Socket support (#466)
* Update conf.go * Update driver.go * Update session.go * Update defaults.go * Update main.go * Update conf.go * Update defaults.go
This commit is contained in:
@@ -18,7 +18,7 @@ func Session(secret string) gin.HandlerFunc {
|
||||
// Redis设置不为空,且非测试模式时使用Redis
|
||||
if conf.RedisConfig.Server != "" && gin.Mode() != gin.TestMode {
|
||||
var err error
|
||||
Store, err = redis.NewStoreWithDB(10, "tcp", conf.RedisConfig.Server, conf.RedisConfig.Password, conf.RedisConfig.DB, []byte(secret))
|
||||
Store, err = redis.NewStoreWithDB(10, conf.RedisConfig.Network, conf.RedisConfig.Server, conf.RedisConfig.Password, conf.RedisConfig.DB, []byte(secret))
|
||||
if err != nil {
|
||||
util.Log().Panic("无法连接到 Redis:%s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user