Browse Source

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

Fixes a regression in c2327161f7
master
Francis Lavoie 3 years ago
committed by GitHub
parent
commit
2e4c09155a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/commandfuncs.go

2
cmd/commandfuncs.go

@ -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

Loading…
Cancel
Save