Skip to content

Commit

Permalink
Add cors to socket.io
Browse files Browse the repository at this point in the history
  • Loading branch information
sonsoleslp committed May 8, 2022
1 parent 7a3a2ad commit 8f05621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {checkAccess, getInfoFromSocket, socketAuthenticate, sendInitialInfo, init
const {getAuthMessageAndCode, NOT_A_PARTICIPANT, NOK} = require("./helpers/apiCodes");

exports.createServer = (server, sessionMiddleware) => {
const io = new Server(server, {"perMessageDeflate": false, "allowEIO3": true });
const io = new Server(server, {"perMessageDeflate": false, "allowEIO3": true, "origin": "*" });

io.use(function (socket, next) {
sessionMiddleware(socket.request, socket.request.res, next);
Expand Down

0 comments on commit 8f05621

Please sign in to comment.