From c1be462d4269416d2e328c5991ef9cc12cdebab9 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 5 Jun 2020 20:13:39 +0300 Subject: [PATCH] app/vmauth: disable automatic response compression/uncompression, since it may work improperly in some cases See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/535 --- app/vmauth/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/vmauth/main.go b/app/vmauth/main.go index 2a5943baf7..9b58cc5e36 100644 --- a/app/vmauth/main.go +++ b/app/vmauth/main.go @@ -79,6 +79,14 @@ var reverseProxy = &httputil.ReverseProxy{ } r.URL = target }, + Transport: func() *http.Transport { + tr := http.DefaultTransport.(*http.Transport).Clone() + // Automatic compression must be disabled in order to fix https://github.com/VictoriaMetrics/VictoriaMetrics/issues/535 + tr.DisableCompression = true + // Disable HTTP/2.0, since VictoriaMetrics components don't support HTTP/2.0 (because there is no sense in this). + tr.ForceAttemptHTTP2 = false + return tr + }(), FlushInterval: time.Second, ErrorLog: logger.StdErrorLogger(), }