westwin
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
11 deletions
-
modules/caddyhttp/reverseproxy/reverseproxy.go
|
|
@ -613,7 +613,6 @@ func (lb LoadBalancing) tryAgain(start time.Time, proxyErr error, req *http.Requ |
|
|
|
// directRequest modifies only req.URL so that it points to the upstream
|
|
|
|
// in the given DialInfo. It must modify ONLY the request URL.
|
|
|
|
func (h Handler) directRequest(req *http.Request, di DialInfo) { |
|
|
|
if req.URL.Host == "" { |
|
|
|
// we need a host, so set the upstream's host address
|
|
|
|
reqHost := di.Address |
|
|
|
|
|
|
@ -626,7 +625,6 @@ func (h Handler) directRequest(req *http.Request, di DialInfo) { |
|
|
|
|
|
|
|
req.URL.Host = reqHost |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// shouldPanicOnCopyError reports whether the reverse proxy should
|
|
|
|
// panic with http.ErrAbortHandler. This is the right thing to do by
|
|
|
|