diff --git a/WatcherAgent/src/config.rs b/WatcherAgent/src/config.rs index 5b6e038..c569b26 100644 --- a/WatcherAgent/src/config.rs +++ b/WatcherAgent/src/config.rs @@ -26,9 +26,14 @@ impl Settings { let builder = config::Config::builder() .add_source(File::with_name("Settings").required(false)) .add_source( - Environment::default() - .separator("_") // "APP" maps to struct `app` - .try_parsing(true), + Environment::with_prefix("APP") + .separator("_") + .prefix_separator("_"), + ) + .add_source( + Environment::with_prefix("SERVER") + .separator("_") + .prefix_separator("_"), ); builder.build()?.try_deserialize()