feat(widget): 优化访客在线轨迹、GeoIP与多站点渠道
This commit is contained in:
@@ -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", ""),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user