mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2025-12-07 07:14:56 -06:00
use CORS websocket in dev mode
This commit is contained in:
@@ -17,7 +17,9 @@ const StatefulDemo = ({ class: className }: StatefulDemoProps) => {
|
||||
useEffect(() => {
|
||||
const socket = new WebSocket(
|
||||
(window.location.protocol === "https:" ? "wss://" : "ws://") +
|
||||
window.location.host +
|
||||
(import.meta.env.DEV != undefined
|
||||
? "localhost:5800"
|
||||
: window.location.host) +
|
||||
"/ws"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user