Fix websocket routing and simplify backend Url resolution