We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7eef773 commit b73d503Copy full SHA for b73d503
websocketproxy.go
@@ -62,6 +62,11 @@ func (w *WebsocketProxy) CloseNotify() {
62
// ServeHTTP implements the http.Handler that proxies WebSocket connections.
63
func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
64
backendURL := w.Backend(req)
65
+ if backendURL == nil {
66
+ log.Println("websocketproxy: backend URL is nil")
67
+ http.Error(rw, "internal server error", http.StatusInternalServerError)
68
+ return
69
+ }
70
71
dialer := w.Dialer
72
if w.Dialer == nil {
0 commit comments