File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ system:
43
43
addr : 8888
44
44
db-type : ' mysql'
45
45
oss-type : ' local' # 控制oss选择走本地还是 七牛等其他仓 自行增加其他oss仓可以在 server/utils/upload/upload.go 中 NewOss函数配置
46
+ use-redis : false # 使用redis
46
47
use-multipoint : false
47
48
# IP限制次数 一个小时15000次
48
49
iplimit-count : 15000
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ type System struct {
6
6
DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
7
7
OssType string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"` // Oss类型
8
8
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` // 多点登录拦截
9
+ UseRedis bool `mapstructure:"use-redis" json:"useRedis" yaml:"use-redis"` // 使用redis
9
10
LimitCountIP int `mapstructure:"iplimit-count" json:"iplimitCount" yaml:"iplimit-count"`
10
11
LimitTimeIP int `mapstructure:"iplimit-time" json:"iplimitTime" yaml:"iplimit-time"`
11
12
}
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type server interface {
15
15
}
16
16
17
17
func RunWindowsServer () {
18
- if global .GVA_CONFIG .System .UseMultipoint {
18
+ if global .GVA_CONFIG .System .UseMultipoint || global . GVA_CONFIG . System . UseRedis {
19
19
// 初始化redis服务
20
20
initialize .Redis ()
21
21
}
You can’t perform that action at this time.
0 commit comments