(proxy, internal/config, internal/log, docs): opt-in websocket support

This commit is contained in:
Tejasvi Nareddy 2019-05-30 22:20:22 -04:00 committed by Teju Nareddy
parent cf61c6be3d
commit f966e5ab19
6 changed files with 55 additions and 4 deletions

View file

@ -164,7 +164,7 @@ func AccessHandler(f func(r *http.Request, status, size int, duration time.Durat
return func(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
start := time.Now()
lw := NewWrapResponseWriter(w, 2)
lw := NewWrapResponseWriter(w, r.ProtoMajor)
next.ServeHTTP(lw, r)
f(r, lw.Status(), lw.BytesWritten(), time.Since(start))
})