[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:
@@ -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(),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user