Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Websocket Fix (#303)
Browse files Browse the repository at this point in the history
The http2FancyWriter does not implement the http.Hijacker method causing the websocket upgrade to throw an exception. This PR fixes the issues by forcing the selection of httpFancyWriter{}
  • Loading branch information
gambol99 committed Jan 8, 2018
1 parent 32a8e7e commit 1f5005e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func entrypointMiddleware(next http.Handler) http.Handler {

// continue the flow
scope := &RequestScope{}
resp := middleware.NewWrapResponseWriter(w, 2)
resp := middleware.NewWrapResponseWriter(w, 1)
next.ServeHTTP(resp, req.WithContext(context.WithValue(req.Context(), contextScopeName, scope)))

// place back the original uri for proxying request
Expand Down

0 comments on commit 1f5005e

Please sign in to comment.