* fix superfluous response call for WS request
when there is a wrong configured proxy before Teleport
it fails to return a proper error during WebSocket connect operation
because of response.WriteHeader duplicate call
first call is happened in the websocket.Upgrader's `returnError` function after WS headers mismatch
and it only sets status to 400 Bad Request without any text
https://github.com/gorilla/websocket/blob/v1.5.3/server.go#L77
Teleport tries to set the response status but fails to do that:
http: superfluous response.WriteHeader call
and the main reason of the error (missing WS headers) is lost
* add explanation for disabling default WS error handler
Co-authored-by: Tiago Silva <tfsantossilva93@gmail.com>
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
* fix gci
---------
Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Artem Nistratov <nistratov.artem@gmail.com>