diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index 9d957c7b9..a2e98f5f4 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -48,6 +48,7 @@ export const socket = SocketIO( : window.location.origin, { path: "/ws", + withCredentials: true, auth: async (callback) => { const token = auth.currentUser && (await auth.currentUser.getIdToken()); callback({ token }); diff --git a/server.js b/server.js index 952d1cc67..d3b809531 100644 --- a/server.js +++ b/server.js @@ -36,6 +36,7 @@ const io = new Server(server, { "https://www.imex.online", ], methods: ["GET", "POST"], + credentials: true, }, }); exports.io = io; @@ -48,7 +49,7 @@ app.use(bodyParser.json({ limit: "50mb" })); app.use(bodyParser.urlencoded({ limit: "50mb", extended: true })); //app.use(enforce.HTTPS({ trustProtoHeader: true })); app.use( - cors() + cors({ credentials: true }) // cors({ // credentials: true, // origin: [