forked from nrabulinski/attic
Merge pull request #134 from srhb/trim-token-file
trim token-file contents
This commit is contained in:
commit
6603ee14ed
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ impl ServerTokenConfig {
|
||||||
match self {
|
match self {
|
||||||
ServerTokenConfig::Raw { token } => Ok(token.clone()),
|
ServerTokenConfig::Raw { token } => Ok(token.clone()),
|
||||||
ServerTokenConfig::File { token_file } => Ok(read_to_string(token_file)
|
ServerTokenConfig::File { token_file } => Ok(read_to_string(token_file)
|
||||||
|
.map(|t| t.trim().to_string())
|
||||||
.with_context(|| format!("Failed to read token from {token_file}"))?),
|
.with_context(|| format!("Failed to read token from {token_file}"))?),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue