We have a GCE project, with several servers behind a loadbalancer. The servers are running a NodeJS HTTPS server. We have recently tried to implement websocket support, but can't seem to connect to it from behind the loadbalancer. As soon as the upgrade header gets sent to the server to initiate the websocket, it closes the connection with a 400 error.
In the loadbalancer's logs we see the following:
@type: "type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry"
statusDetails: "upgrade_header_rejected"
The connection doesn't seem to go through to our backend servers. Does anyone know how to solve this?