isWebsocket checks wether the incoming request is a part of websocket handshake
(req *http.Request)
| 107 | // isWebsocket checks wether the incoming request is a part of websocket |
| 108 | // handshake |
| 109 | func isWebsocket(req *http.Request) bool { |
| 110 | if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" || |
| 111 | !strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") { |
| 112 | return false |
| 113 | } |
| 114 | return true |
| 115 | } |
| 116 | |
| 117 | func (p *Proxy) CloseNotify() chan bool { |
| 118 | return p.closeC |