ezidam: config via env variables
This commit is contained in:
parent
c1b8fd3c89
commit
89e0432b7a
1 changed files with 2 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ pub fn config() -> rocket::figment::Figment {
|
|||
Figment::from(Config::default())
|
||||
// from `ezidam.toml`
|
||||
.merge(Toml::file(Env::var_or("EZIDAM_CONFIG", "ezidam.toml")).nested())
|
||||
// from env variables directly
|
||||
.merge(Env::prefixed("EZIDAM_").ignore(&["PROFILE"]).global())
|
||||
// from code below
|
||||
.merge(("ip_header", "x-forwarded-for"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue