This commit is contained in:
Mateusz Gruszczyński committed 2026-10-08 09:42:10 +02:00
1 parent c24bc4279b
commit 3b3f0db377
84 files changed
+2686 -392

No files matched your search

+14
View File
@@ -73,6 +73,20 @@ fn ensure_locked_listener(config: &mut crate::config::Config, address: SocketAdd
endpoint.enabled = true;
return;
}
// An explicit startup HTTP/HTTPS address overrides the canonical default
// listener created by earlier starts. Keep separately named/custom listeners
// intact, but do not retain the old default :80/:443 binding alongside a
// command-line/systemd override.
let canonical_id = if tls { "https" } else { "http" };
if let Some(endpoint) = config.listeners.endpoints.iter_mut().find(|endpoint| {
endpoint.id == canonical_id && endpoint.binding.tls == tls
}) {
endpoint.binding.address = address;
endpoint.additional_addresses.clear();
endpoint.enabled = true;
return;
}
let base = if tls { "systemd-https" } else { "systemd-http" };
let mut id = base.to_owned();
let mut suffix = 2usize;