mirror of
https://github.com/caddyserver/caddy.git
synced 2025-03-22 13:29:27 +01:00
reverseproxy: Change 500 error to 502 for lookup_srv config (#3771)
Fixes #3763
This commit is contained in:
parent
aa9c3eb732
commit
3b9eae70c9
1 changed files with 2 additions and 1 deletions
|
@ -384,7 +384,8 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht
|
||||||
// DialInfo struct should have valid network address syntax
|
// DialInfo struct should have valid network address syntax
|
||||||
dialInfo, err := upstream.fillDialInfo(r)
|
dialInfo, err := upstream.fillDialInfo(r)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("making dial info: %v", err)
|
err = fmt.Errorf("making dial info: %v", err)
|
||||||
|
return caddyhttp.Error(http.StatusBadGateway, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// attach to the request information about how to dial the upstream;
|
// attach to the request information about how to dial the upstream;
|
||||||
|
|
Loading…
Reference in a new issue