diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-05 16:29:10 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-11-05 16:29:10 -0700 |
commit | 8e515289cbde97fb7ac18a3d035e03f8d0c8befe (patch) | |
tree | 623f5e044316497fb672b23141f10910740e45b6 /modules/caddyhttp/reverseproxy/reverseproxy.go | |
parent | 6e95477224d5fe0856c4fba0f71afe1d7289ed74 (diff) |
reverse_proxy: Add support for NTLM
Diffstat (limited to 'modules/caddyhttp/reverseproxy/reverseproxy.go')
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index f1e9144..77dc005 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -311,15 +311,7 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht // This assumes that no mutations of the request are performed // by h during or after proxying. func (h Handler) prepareRequest(req *http.Request) error { - // as a special (but very common) case, if the transport - // is HTTP, then ensure the request has the proper scheme - // because incoming requests by default are lacking it - if req.URL.Scheme == "" { - req.URL.Scheme = "http" - if ht, ok := h.Transport.(*HTTPTransport); ok && ht.TLS != nil { - req.URL.Scheme = "https" - } - } + // most of this is borrowed from the Go std lib reverse proxy if req.ContentLength == 0 { req.Body = nil // Issue golang/go#16036: nil Body for http.Transport retries |