diff --git a/packages/client-next/src/lib/network.ts b/packages/client-next/src/lib/network.ts index fe51e54..f48d23a 100644 --- a/packages/client-next/src/lib/network.ts +++ b/packages/client-next/src/lib/network.ts @@ -22,6 +22,7 @@ class Network extends EventEmitter { import.meta.env.VITE_API_HOST, { autoConnect: false, + withCredentials: true, } ); private online_count = 0; diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index df017e9..fcd9bf0 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -36,6 +36,10 @@ const session = expressSession({ client: redisClient, prefix: "canvas_session:", }), + cookie: { + sameSite: "none", + httpOnly: false, + }, }); const app = express(); const server = http.createServer(app); @@ -55,7 +59,8 @@ const io = new Server< } >(server, { cors: { - origin: "*", + origin: "http://10.1.10.248:5173", + credentials: true, }, });