Selaa lähdekoodia

Merge pull request #14978 from gesellix/websocket-disable-check-origin

skip checkOrigin during websocket handshake
Brian Goff 10 vuotta sitten
vanhempi
commit
e134ccada7
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      api/server/container.go

+ 2 - 1
api/server/container.go

@@ -528,7 +528,8 @@ func (s *Server) wsContainersAttach(version version.Version, w http.ResponseWrit
 			logrus.Errorf("Error attaching websocket: %s", err)
 		}
 	})
-	h.ServeHTTP(w, r)
+	ws := websocket.Server{Handler: h, Handshake: nil}
+	ws.ServeHTTP(w, r)
 
 	return nil
 }