[core] Unix upstreams: unix:/path parses strictly into a socket upstream; edge proxies and health-checks it in plain HTTP over the socket, Caddy dials unix/<path>

This commit is contained in:
2026-11-10 21:04:24 +01:00
parent 84c1c81906
commit d74079c66d
8 changed files with 183 additions and 10 deletions
+5 -1
View File
@@ -281,7 +281,11 @@ fn host_route(h: &Host, fa: Option<&ForwardAuth>, o: &CompileOptions) -> Value {
fn upstreams(list: &[&Upstream]) -> Value {
Value::Array(
list.iter()
.map(|u| json!({ "dial": u.authority() }))
.map(|u| match u.unix_path() {
// Caddy's network address: `unix/` then the absolute path.
Some(p) => json!({ "dial": format!("unix/{p}") }),
None => json!({ "dial": u.authority() }),
})
.collect(),
)
}