aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-08 17:52:42 +0100
committerAlex Auvolat <alex@adnab.me>2021-12-08 17:52:42 +0100
commit25ddb1b23e0ac1171cf83206c17245f1d93a8ae8 (patch)
tree37347dbc34c2e1b1032fe28283d5d9d69483c75d
parent3bdb417bfb87d7ef3381be2d56346a7995c54dde (diff)
downloadtricot-25ddb1b23e0ac1171cf83206c17245f1d93a8ae8.tar.gz
tricot-25ddb1b23e0ac1171cf83206c17245f1d93a8ae8.zip
Special handling of hostname:port
-rw-r--r--src/cert_store.rs6
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());
+ }
}
}