Signed-off-by: Jacob Kiers <code@kiers.eu>
This commit is contained in:
Jacob Kiers 2023-10-04 20:48:01 +02:00
parent 086e2b4766
commit da46c5873f

View File

@ -147,7 +147,7 @@ fn load_config(path: &str) -> Result<ParsedConfig, ConfigError> {
}
};
let upsteam_port = match upstream_url.port_or_known_default() {
let upstream_port = match upstream_url.port_or_known_default() {
Some(port) => port,
None => {
return Err(ConfigError::Custom(format!(
@ -171,11 +171,11 @@ fn load_config(path: &str) -> Result<ParsedConfig, ConfigError> {
name.to_string(),
Upstream::Custom(CustomUpstream {
name: name.to_string(),
addr: format!("{}:{}", upstream_host, upsteam_port),
addr: format!("{}:{}", upstream_host, upstream_port),
protocol: upstream_url.scheme().to_string(),
addresses: Addr(Mutex::new(UpstreamAddress::new(format!(
"{}:{}",
upstream_host, upsteam_port
upstream_host, upstream_port
)))),
..Default::default()
}),