Don't validate origin header on websocket upgrades
The apiserver does CORS checks for all aggregated servers if it is
requested. The aggregated apiserver does not have to do it.
@@ -62,6 +62,9 @@ func (app *SubresourceAPIApp) requestHandler(request *restful.Request, response
var upgrader = websocket.Upgrader{
ReadBufferSize: kubecli.WebsocketMessageBufferSize,
WriteBufferSize: kubecli.WebsocketMessageBufferSize,
+ CheckOrigin: func(_ *http.Request) bool {
+ return true
+ },
}
clientSocket, err := upgrader.Upgrade(response.ResponseWriter, request.Request, nil)
