From 09931ff955574b1336bb1390e80b0627121fa5a5 Mon Sep 17 00:00:00 2001 From: hiimgoodpack Date: Thu, 28 Jan 2021 15:43:26 -0500 Subject: [PATCH] Make default configuration work v2 --- README.md | 2 ++ config.js | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48d46cf..5b730a4 100644 --- a/README.md +++ b/README.md @@ -47,4 +47,6 @@ Just run Brainlet with the command below: node index.js ``` +Afterwards, try going [here](http://localhost:3005/auth.html) to visit the site. + Good luck! diff --git a/config.js b/config.js index 0259e48..4284b37 100755 --- a/config.js +++ b/config.js @@ -8,7 +8,6 @@ module.exports = { // specialCode: '' // } //}, - corsAllowList: [ 'localhost' ], mongoUrl: 'mongodb://localhost:27017/app', bcryptRounds: 10, roleMap: { @@ -20,3 +19,12 @@ module.exports = { }, 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` +];