'Cypress web sockets error: 'Sec-WebSocket-Accept' header is missing

I am trying to test a VueJs application with Cypress.

Everything works well except the websocket connection that fails with the message:

Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing

On dev or deployed, it works without issue and the 'Sec-WebSocket-Accept' header is present but no clue why it fails with Cypress.

Any idea?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source