diff --git a/websocket.go b/websocket.go index 522b88e3..fcc72fc5 100644 --- a/websocket.go +++ b/websocket.go @@ -22,7 +22,8 @@ func headerContains(header http.Header, name string, value string) bool { func isWebSocketRequest(r *http.Request) bool { return headerContains(r.Header, "Connection", "upgrade") && - headerContains(r.Header, "Upgrade", "websocket") + ( headerContains(r.Header, "Upgrade", "websocket") || + headerContains(r.Header, "Upgrade", "SPDY/3.1")) } func (proxy *ProxyHttpServer) serveWebsocketTLS(ctx *ProxyCtx, w http.ResponseWriter, req *http.Request, tlsConfig *tls.Config, clientConn *tls.Conn) {