dev: allow separate origins for backend & frontend
This commit is contained in:
parent
774d56fbee
commit
b1b4fdffb4
|
@ -22,6 +22,7 @@ class Network extends EventEmitter<INetworkEvents> {
|
|||
import.meta.env.VITE_API_HOST,
|
||||
{
|
||||
autoConnect: false,
|
||||
withCredentials: true,
|
||||
}
|
||||
);
|
||||
private online_count = 0;
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue