diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-08 17:52:42 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-08 17:52:42 +0100 |
commit | 25ddb1b23e0ac1171cf83206c17245f1d93a8ae8 (patch) | |
tree | 37347dbc34c2e1b1032fe28283d5d9d69483c75d | |
parent | 3bdb417bfb87d7ef3381be2d56346a7995c54dde (diff) | |
download | tricot-25ddb1b23e0ac1171cf83206c17245f1d93a8ae8.tar.gz tricot-25ddb1b23e0ac1171cf83206c17245f1d93a8ae8.zip |
Special handling of hostname:port
-rw-r--r-- | src/cert_store.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cert_store.rs b/src/cert_store.rs index e2ad62b..bc05d1b 100644 --- a/src/cert_store.rs +++ b/src/cert_store.rs @@ -48,7 +48,11 @@ impl CertStore { let proxy_config: Arc<ProxyConfig> = rx_proxy_config.borrow().clone(); for ent in proxy_config.entries.iter() { if let HostDescription::Hostname(domain) = &ent.host { - domains.insert(domain.clone()); + if let Some((host, _port)) = domain.split_once(':') { + domains.insert(host.to_string()); + } else { + domains.insert(domain.clone()); + } } } |