I am using Gorilla Websocket package to implement a websocket.
conn, err := upgrader.Upgrade(w, r, nil)
if err != nil {
// handle error
fmt.Println(err)
}
defer conn.Close()
I am see the below error
websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
I printed on the header of my request, and I am seeing the below
Sec-Fetch-User ?1
Sec-Fetch-Dest document
Referer http://localhost:4747/home
Cookie myGoLiveCookie=369d99fa-901d-4b23-a64b-4731247de304
Sec-Ch-Ua "Google Chrome";v="87", " Not;A Brand";v="99", "Chromium";v="87"
Sec-Ch-Ua-Mobile ?0
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Sec-Fetch-Site same-origin
Accept-Encoding gzip, deflate, br
Upgrade-Insecure-Requests 1
Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Mode navigate
Accept-Language en-GB,en-US;q=0.9,en;q=0.8
Connection keep-alive
There is no Upgrade websocket or Connection Upgrade as per expected
I believe I am facing the exact same issue as this one.