proxy websocket url
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -10,6 +10,11 @@ export default defineConfig({
|
||||
target: 'http://localhost:8000',
|
||||
changeOrigin: true,
|
||||
},
|
||||
'/ws': {
|
||||
target: "ws://localhost:8000",
|
||||
ws: true,
|
||||
changeOrigin: true,
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user