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

update cors

parent 3b730de1
......@@ -11,10 +11,11 @@ const PORT = 3001;
const server = http_1.default.createServer(server_1.default);
const io = new socket_io_1.Server(server, {
cors: {
origin: '*',
// origin: '*',
methods: ["GET", "POST"],
// origin: ["http://localhost:7456"],
// credentials: true,
origin: ["https://play.gamee.vn", "https://dev.gamee.vn", "http://localhost:7456"],
credentials: true,
}
});
(0, socket_1.setupSocket)(io);
......
{
"name": "game-sever-flip-jump",
"version": "1.0.0",
"version": "1.0.1",
"description": "",
"main": "index.js",
"scripts": {
......
......@@ -8,10 +8,11 @@ const server = http.createServer(app);
const io = new Server(server, {
cors: {
origin: '*',
// origin: '*',
methods: ["GET", "POST"],
// origin: ["http://localhost:7456"],
// credentials: true,
origin: ["https://play.gamee.vn","https://dev.gamee.vn","http://localhost:7456"],
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