diff --git a/client/src/App.jsx b/client/src/App.jsx index 9b76aa5..40a4c19 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -22,8 +22,8 @@ function App() { }, [connect]); const renderPanelContent = () => { - const apiUrl = 'http://localhost:3001'; - const wsUrl = 'ws://localhost:3002'; + const apiUrl = import.meta.env.VITE_API_URL || `${window.location.protocol}//${window.location.host}/api`; + const wsUrl = import.meta.env.VITE_WS_URL || `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${window.location.host}/ws`; switch (panelTab) { case 'control':