From 56181a45a17a9d984f5fc6011f595f9f1e2b7499 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 17 Oct 2022 18:52:12 +0200 Subject: [PATCH] internal: limit body size Signed-off-by: Jens Langhammer --- internal/web/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/web/proxy.go b/internal/web/proxy.go index 0b9f2435e..339c531d1 100644 --- a/internal/web/proxy.go +++ b/internal/web/proxy.go @@ -61,6 +61,7 @@ func (ws *WebServer) configureProxy() { Requests.With(prometheus.Labels{ "dest": "py", }).Observe(float64(time.Since(before))) + r.Body = http.MaxBytesReader(rw, r.Body, 32*1024*1024) rp.ServeHTTP(rw, r) })) }