[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:
@@ -306,6 +306,11 @@ impl ProxyHttp for EdgeProxy {
|
||||
Error::explain(ErrorType::HTTPStatus(503), "no healthy upstream")
|
||||
})?;
|
||||
let up = &host.upstreams[i];
|
||||
if let Some(path) = &up.unix {
|
||||
// A socket: one peer, nothing to resolve and no other address to try.
|
||||
log::debug!(target: "ianitor::proxy", "{}: upstream {}", host.cfg.hostname, up.authority);
|
||||
return Ok(Box::new(fetch::unix_peer(path)?));
|
||||
}
|
||||
ctx.addrs = match up.resolve().await {
|
||||
Ok(a) => a,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user