Using relative URL for the websocket.
This commit is contained in:
@@ -187,7 +187,7 @@ class WebsocketClientApp {
|
||||
// @ts-ignore
|
||||
RTVIConfig.customConnectHandler = () => Promise.resolve(
|
||||
{
|
||||
ws_url: "http://localhost:8765/ws",
|
||||
ws_url: "/ws",
|
||||
}
|
||||
);
|
||||
this.rtviClient = new RTVIClient(RTVIConfig);
|
||||
|
||||
@@ -6,9 +6,8 @@ export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
proxy: {
|
||||
// Proxy /api requests to the backend server
|
||||
'/ws': {
|
||||
target: 'http://0.0.0.0:8765', // Replace with your backend URL
|
||||
target: 'ws://0.0.0.0:8765', // Replace with your backend URL
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user