diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-30 11:49:53 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2020-03-30 11:49:53 -0600 |
commit | 105acfa08664c97460a6fe3fb49635618be5bcb2 (patch) | |
tree | 3c8ea6bc0fa1d335787a5b4852bd03ae50d4ef81 /modules/caddyhttp/reverseproxy | |
parent | deba26d225c5b321a944439eb6b108117ac3d569 (diff) |
Keep type information with placeholders until replacements happen
Diffstat (limited to 'modules/caddyhttp/reverseproxy')
-rw-r--r-- | modules/caddyhttp/reverseproxy/reverseproxy.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/caddyhttp/reverseproxy/reverseproxy.go b/modules/caddyhttp/reverseproxy/reverseproxy.go index 4ac50ac..6d0d441 100644 --- a/modules/caddyhttp/reverseproxy/reverseproxy.go +++ b/modules/caddyhttp/reverseproxy/reverseproxy.go @@ -24,7 +24,6 @@ import ( "net" "net/http" "regexp" - "strconv" "strings" "sync" "time" @@ -328,9 +327,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyht 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())) + repl.Set("http.reverse_proxy.upstream.requests", upstream.Host.NumRequests()) + repl.Set("http.reverse_proxy.upstream.max_requests", upstream.MaxRequests) + repl.Set("http.reverse_proxy.upstream.fails", upstream.Host.Fails()) // mutate request headers according to this upstream; // because we're in a retry loop, we have to copy |