From 8758edce3bd02d28506f65446d856db4843623c2 Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Thu, 26 Sep 2019 10:51:04 +0200 Subject: [PATCH] =?UTF-8?q?feat(config):=20display=20cors=20at=20launch=20?= =?UTF-8?q?=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/defaults/development.js | 2 +- lib/app.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/defaults/development.js b/config/defaults/development.js index f136a9f9d..ab3f296d3 100644 --- a/config/defaults/development.js +++ b/config/defaults/development.js @@ -73,7 +73,7 @@ module.exports = { xssProtection: true, }, cors: { - origin: ['http://localhost:4200'], + origin: [], credentials: true, }, // Data filter whitelist & Blacklist diff --git a/lib/app.js b/lib/app.js index 36c38326d..e88202d3e 100644 --- a/lib/app.js +++ b/lib/app.js @@ -101,6 +101,7 @@ const logConfiguration = () => { console.log(chalk.green(`Environment: ${process.env.NODE_ENV ? process.env.NODE_ENV : 'develoment'}`)); console.log(chalk.green(`Server: ${server}`)); console.log(chalk.green(`Database: ${config.db.uri}`)); + if (config.cors.origin.length > 0) console.log(chalk.green(`Cors: ${config.cors.origin}`)); }; // Boot up the server