From 839b3872732f92e9ac8be188842fffde9c4b352a Mon Sep 17 00:00:00 2001 From: hippoz Date: Thu, 4 Mar 2021 21:32:29 +0200 Subject: [PATCH] Merge --- config.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/config.js b/config.js index 2e3e0d3..93a131a 100755 --- a/config.js +++ b/config.js @@ -8,10 +8,7 @@ module.exports = { // specialCode: '' // } //}, - corsAllowList: [ "http://localhost:3000", "http://localhost:3005" ], - mongoUrl: "mongodb://192.168.0.105:27017/app", - - // Internal stuff - only touch if you know what you're doing + mongoUrl: "mongodb://localhost:27017/app", bcryptRounds: 10, roleMap: { "BANNED": 0, @@ -20,6 +17,14 @@ module.exports = { "BOT": 3, "ADMIN": 4 }, - gatewayStillNotConnectedTimeoutMS: 15*1000, - gatewayMaxStringPayloadLength: + gatewayStillNotConnectedTimeoutMS: 15*1000 }; +module.exports.corsAllowList = [ + // Allow the normal web interface + `http://${module.exports.address}:${module.exports.ports.mainServerPort}`, + `https://${module.exports.address}:${module.exports.ports.mainServerPort}`, + + // Allow brainet-react + `http://${module.exports.address}:3000`, + `https://${module.exports.address}:3000` +];