Commit b1b4fdff authored by Grant's avatar Grant
Browse files

dev: allow separate origins for backend & frontend

parent 774d56fb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ class Network extends EventEmitter<INetworkEvents> {
    import.meta.env.VITE_API_HOST,
    {
      autoConnect: false,
      withCredentials: true,
    }
  );
  private online_count = 0;
+6 −1
Original line number Diff line number Diff line
@@ -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,
  },
});