fix(traefik): remove Content-Length header

HTTP/2 connections would fail to load when sending the `Content-Length` header

Fixes #165
This commit is contained in:
patcher-ms
2023-09-13 15:34:27 +01:00
committed by GitHub
parent e7469c8676
commit 0f7e552c9c

View File

@@ -46,6 +46,5 @@ func (sm *SablierMiddleware) ServeHTTP(rw http.ResponseWriter, req *http.Request
func forward(resp *http.Response, rw http.ResponseWriter) {
rw.Header().Set("Content-Type", resp.Header.Get("Content-Type"))
rw.Header().Set("Content-Length", resp.Header.Get("Content-Length"))
io.Copy(rw, resp.Body)
}