internal: limit body size
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ddc23c6d88
commit
56181a45a1
|
@ -61,6 +61,7 @@ func (ws *WebServer) configureProxy() {
|
||||||
Requests.With(prometheus.Labels{
|
Requests.With(prometheus.Labels{
|
||||||
"dest": "py",
|
"dest": "py",
|
||||||
}).Observe(float64(time.Since(before)))
|
}).Observe(float64(time.Since(before)))
|
||||||
|
r.Body = http.MaxBytesReader(rw, r.Body, 32*1024*1024)
|
||||||
rp.ServeHTTP(rw, r)
|
rp.ServeHTTP(rw, r)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue