feat(widget): 优化访客在线轨迹、GeoIP与多站点渠道
CI / Frontend (typecheck + lint + build) (push) Successful in 2m5s
CI / Backend (go vet + test) (push) Failing after 5m20s

This commit is contained in:
yml2213
2026-11-06 18:21:30 +08:00
parent 24fac1bcf1
commit 38d6fc1684
37 changed files with 1071 additions and 123 deletions
+8
View File
@@ -13,6 +13,7 @@ type Config struct {
JWT JWTConfig
Storage StorageConfig
Redis RedisConfig
GeoIP GeoIPConfig
AllowedOrigins []string
}
@@ -61,6 +62,10 @@ type RedisConfig struct {
DB int
}
type GeoIPConfig struct {
DBPath string
}
func Load() *Config {
return &Config{
Server: ServerConfig{
@@ -109,6 +114,9 @@ func Load() *Config {
Password: getEnv("REDIS_PASSWORD", ""),
DB: getEnvInt("REDIS_DB", 0),
},
GeoIP: GeoIPConfig{
DBPath: getEnv("GEOIP_DB_PATH", ""),
},
}
}