[control] UI socket: with [ui] socket control also serves the API on a 0660 Unix socket and trusts the proof only there; a socket upstream is refused unless it is the admin host on control's own socket; probes under Caddy reach it too

This commit is contained in:
2026-11-10 21:06:56 +01:00
parent 1f5e4a59a0
commit d249bcf9f2
7 changed files with 160 additions and 8 deletions
+4 -1
View File
@@ -123,7 +123,10 @@ impl Control {
async fn probe_host(hostname: &str, r: &Rule) -> Vec<(String, caddy_link::UpstreamProbe)> {
let mut out = Vec::new();
for u in &r.upstreams {
let host_header = if r.has_check {
let host_header = if r.has_check && u.is_unix() {
// As edge: a socket has no authority to name.
"localhost".to_owned()
} else if r.has_check {
u.authority()
} else {
hostname.to_owned()