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