mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
feat(config): disable logging and usage stats by default
This commit is contained in:
@@ -180,8 +180,8 @@ func LoadConfigOptional(configFile string, optional bool) (*Config, error) {
|
||||
// Unmarshal the YAML data into the Config struct.
|
||||
var cfg Config
|
||||
// Set defaults before unmarshal so that absent keys keep defaults.
|
||||
cfg.LoggingToFile = true
|
||||
cfg.UsageStatisticsEnabled = true
|
||||
cfg.LoggingToFile = false
|
||||
cfg.UsageStatisticsEnabled = false
|
||||
if err = yaml.Unmarshal(data, &cfg); err != nil {
|
||||
if optional {
|
||||
// In cloud deploy mode, if YAML parsing fails, return empty config instead of error.
|
||||
|
||||
Reference in New Issue
Block a user