proxy websocket url
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import React, { createContext, useContext, useEffect, useState } from "react";
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
||||||
|
|
||||||
const WEBSOCKET_URL = "ws://localhost:8000/ws/freqsplit/";
|
const WEBSOCKET_URL = "/ws/freqsplit/";
|
||||||
|
|
||||||
interface WebSocketContextType {
|
interface WebSocketContextType {
|
||||||
socket: WebSocket | null;
|
socket: WebSocket | null;
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ export default defineConfig({
|
|||||||
target: 'http://localhost:8000',
|
target: 'http://localhost:8000',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
|
'/ws': {
|
||||||
|
target: "ws://localhost:8000",
|
||||||
|
ws: true,
|
||||||
|
changeOrigin: true,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user