diff --git a/client/src/contexts/WebSocketContext.tsx b/client/src/contexts/WebSocketContext.tsx index c345a18..eaca89c 100644 --- a/client/src/contexts/WebSocketContext.tsx +++ b/client/src/contexts/WebSocketContext.tsx @@ -1,6 +1,6 @@ import React, { createContext, useContext, useEffect, useState } from "react"; -const WEBSOCKET_URL = "ws://localhost:8000/ws/freqsplit/"; +const WEBSOCKET_URL = "/ws/freqsplit/"; interface WebSocketContextType { socket: WebSocket | null; diff --git a/client/vite.config.ts b/client/vite.config.ts index 12f020c..700d569 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -10,6 +10,11 @@ export default defineConfig({ target: 'http://localhost:8000', changeOrigin: true, }, + '/ws': { + target: "ws://localhost:8000", + ws: true, + changeOrigin: true, + } }, }, })