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