Added cors to the index.js

This commit is contained in:
Mathias Wagner 2023-06-10 03:55:36 +02:00
parent 886d07c1fc
commit 845f9dc88d

View File

@ -6,7 +6,7 @@ const app = express();
app.disable("x-powered-by"); app.disable("x-powered-by");
const server = http.createServer(app); const server = http.createServer(app);
const io = new Server(server); const io = new Server(server, {cors: {origin: "*"}});
io.on("connection", require("./handler/connection")); io.on("connection", require("./handler/connection"));