1
0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-03-15 01:58:51 +01:00

cmd: Fix unix socket addresses for admin API requests ()

Fixes a regression in c2327161f7
This commit is contained in:
Francis Lavoie 2022-04-28 10:31:59 -04:00 committed by GitHub
parent dcc98da4d2
commit 2e4c09155a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -669,7 +669,7 @@ func AdminAPIRequest(adminAddr, method, uri string, headers http.Header, body io
} }
origin := "http://" + parsedAddr.JoinHostPort(0) origin := "http://" + parsedAddr.JoinHostPort(0)
if parsedAddr.IsUnixNetwork() { if parsedAddr.IsUnixNetwork() {
origin = "unixsocket" // hack so that http.NewRequest() is happy origin = "http://unixsocket" // hack so that http.NewRequest() is happy
} }
// form the request // form the request