chore: sync test config and update redis doc
This commit is contained in:
@@ -9,7 +9,7 @@ BaseURI = "http://localhost:8080"
|
||||
Token = ""
|
||||
|
||||
[Http]
|
||||
Port = 8080
|
||||
Port = 18080
|
||||
|
||||
[Http.Cors]
|
||||
Mode = "dev"
|
||||
@@ -21,16 +21,29 @@ AllowMethods = "GET,POST,PUT,PATCH,DELETE,OPTIONS"
|
||||
ExposeHeaders = "*"
|
||||
AllowCredentials = true
|
||||
|
||||
[Http.RateLimit]
|
||||
Enabled = true
|
||||
Max = 5
|
||||
WindowSeconds = 10
|
||||
Message = "Too Many Requests"
|
||||
|
||||
[Http.RateLimit.Redis]
|
||||
Addrs = ["127.0.0.1:6379"]
|
||||
Username = ""
|
||||
Password = "testpass"
|
||||
DB = 2
|
||||
Prefix = "rl:"
|
||||
|
||||
[Database]
|
||||
Host = "127.0.0.1"
|
||||
Port = 5432
|
||||
Database = "quyun_v2_test"
|
||||
Host = "10.1.1.2"
|
||||
Port = 5433
|
||||
Database = "quyun_v2"
|
||||
Username = "postgres"
|
||||
Password = "postgres"
|
||||
Password = "xixi0202"
|
||||
SslMode = "disable"
|
||||
TimeZone = "Asia/Shanghai"
|
||||
MaxIdleConns = 10
|
||||
MaxOpenConns = 20
|
||||
MaxOpenConns = 100
|
||||
ConnMaxLifetime = "1800s"
|
||||
ConnMaxIdleTime = "300s"
|
||||
|
||||
|
||||
@@ -17,6 +17,9 @@ sudo -n docker run -d --name quyun-redis -p 6379:6379 docker.hub.ipao.vip/redis:
|
||||
## Config sample
|
||||
|
||||
```toml
|
||||
[Http]
|
||||
Port = 18080 # 如果 8080 被占用,可调整端口
|
||||
|
||||
[Http.RateLimit]
|
||||
Enabled = true
|
||||
Max = 120
|
||||
|
||||
Reference in New Issue
Block a user