From 7a794a3995b590f4145d1bf819d206534c6d5a8a Mon Sep 17 00:00:00 2001 From: Arne van Iterson Date: Tue, 10 Nov 2020 23:03:05 +0100 Subject: [PATCH] CORS for socket.io --- src/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index a321f52..f5761a3 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,10 @@ const style = require("ansi-styles"); const Gamedig = require("gamedig"); const io = require("socket.io")(server, { - path: "/socket.io" + path: "/socket.io", + cors: { + origin: true + } }); var ns = {