diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-12-12 14:31:20 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-12-12 14:31:20 -0700 |
commit | 87b6cf470baacd659cd20815de2804ae4a31df7f (patch) | |
tree | 2faea4d119909790d0b1a489c0ea46b34f44dd52 /modules/caddyhttp/reverseproxy/reverseproxy.go | |
parent | f935458e3e30a8d9f47f37ad35fe9c546b841fa3 (diff) |
Minor improvements; comments and shorter placeholders & module IDs
Diffstat (limited to 'modules/caddyhttp/reverseproxy/reverseproxy.go')
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 132f222..d353dc1 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -288,13 +288,13 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht r = r.WithContext(ctx) // set placeholders with information about this upstream - repl.Set("http.handlers.reverse_proxy.upstream.address", dialInfo.String()) - repl.Set("http.handlers.reverse_proxy.upstream.hostport", dialInfo.Address) - repl.Set("http.handlers.reverse_proxy.upstream.host", dialInfo.Host) - repl.Set("http.handlers.reverse_proxy.upstream.port", dialInfo.Port) - repl.Set("http.handlers.reverse_proxy.upstream.requests", strconv.Itoa(upstream.Host.NumRequests())) - repl.Set("http.handlers.reverse_proxy.upstream.max_requests", strconv.Itoa(upstream.MaxRequests)) - repl.Set("http.handlers.reverse_proxy.upstream.fails", strconv.Itoa(upstream.Host.Fails())) + repl.Set("http.reverse_proxy.upstream.address", dialInfo.String()) + repl.Set("http.reverse_proxy.upstream.hostport", dialInfo.Address) + repl.Set("http.reverse_proxy.upstream.host", dialInfo.Host) + repl.Set("http.reverse_proxy.upstream.port", dialInfo.Port) + repl.Set("http.reverse_proxy.upstream.requests", strconv.Itoa(upstream.Host.NumRequests())) + repl.Set("http.reverse_proxy.upstream.max_requests", strconv.Itoa(upstream.MaxRequests)) + repl.Set("http.reverse_proxy.upstream.fails", strconv.Itoa(upstream.Host.Fails())) // mutate request headers according to this upstream; // because we're in a retry loop, we have to copy |