Commit e409da78 authored by Vũ Gia Vương's avatar Vũ Gia Vương

log origin

parent 2030735c
...@@ -14,6 +14,7 @@ const io = new socket_io_1.Server(server, { ...@@ -14,6 +14,7 @@ const io = new socket_io_1.Server(server, {
cors: { cors: {
methods: ["GET", "POST"], methods: ["GET", "POST"],
origin: (origin, callback) => { origin: (origin, callback) => {
console.log('origin', origin);
const allowed = [ const allowed = [
"https://play.gamee.vn", "https://play.gamee.vn",
"https://dev.gamee.vn", "https://dev.gamee.vn",
...@@ -26,7 +27,7 @@ const io = new socket_io_1.Server(server, { ...@@ -26,7 +27,7 @@ const io = new socket_io_1.Server(server, {
callback(new Error("Not allowed by CORS")); callback(new Error("Not allowed by CORS"));
} }
}, },
credentials: true, // credentials: true,
} }
}); });
(0, socket_1.setupSocket)(io); (0, socket_1.setupSocket)(io);
......
...@@ -11,6 +11,7 @@ const io = new Server(server, { ...@@ -11,6 +11,7 @@ const io = new Server(server, {
cors: { cors: {
methods: ["GET", "POST"], methods: ["GET", "POST"],
origin: (origin, callback) => { origin: (origin, callback) => {
console.log('origin', origin)
const allowed = [ const allowed = [
"https://play.gamee.vn", "https://play.gamee.vn",
"https://dev.gamee.vn", "https://dev.gamee.vn",
...@@ -22,7 +23,7 @@ const io = new Server(server, { ...@@ -22,7 +23,7 @@ const io = new Server(server, {
callback(new Error("Not allowed by CORS")); callback(new Error("Not allowed by CORS"));
} }
}, },
credentials: true, // credentials: true,
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment