Files
quyun-v2/backend/config.test.toml

82 lines
1.3 KiB
TOML

# Test configuration for local development.
# This file is used when ENV_LOCAL=test.
[App]
Mode = "testing"
BaseURI = "http://localhost:8080"
[App.Super]
Token = ""
[Http]
Port = 18080
[Http.Cors]
Mode = "dev"
[[Http.Cors.Whitelist]]
AllowOrigin = "http://localhost:5173"
AllowHeaders = "Content-Type,Authorization"
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 = "10.1.1.2"
Port = 5433
Database = "quyun_v2"
Username = "postgres"
Password = "xixi0202"
SslMode = "disable"
TimeZone = "Asia/Shanghai"
MaxIdleConns = 10
MaxOpenConns = 100
ConnMaxLifetime = "1800s"
ConnMaxIdleTime = "300s"
[JWT]
SigningKey = "test-secret"
ExpiresTime = "168h"
Issuer = "v2"
[HashIDs]
Salt = "test-salt"
MinLength = 8
[Redis]
Host = "127.0.0.1"
Port = 6379
Password = ""
DB = 0
PoolSize = 20
MinIdleConns = 5
MaxRetries = 3
DialTimeout = "5s"
ReadTimeout = "3s"
WriteTimeout = "3s"
[Storage]
Type = "local"
LocalPath = "./storage"
Secret = "test-storage-secret"
BaseURL = "/v1/storage"
AccessKey = ""
SecretKey = ""
Region = ""
Bucket = ""
Endpoint = ""
PathStyle = true