From a4941be3de3b849a6b1e4885b4801f3987125ba0 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 28 Nov 2018 14:38:42 +0100 Subject: [PATCH] Warn on missing serverURL We see some issues that are based on not properly configured `config.serverURL`. This patch adds a warning when `config.serverURL` is an empty value. This should provide users direct feedback about how to improve their configs. Signed-off-by: Sheogorath --- lib/config/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/config/index.js b/lib/config/index.js index c1005b0..b848096 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -101,6 +101,10 @@ config.serverURL = (function getserverurl () { return url })() +if (config.serverURL === '') { + logger.warn('Neither \'domain\' nor \'CMD_DOMAIN\' is configured. This can cause issues with various components.\nHint: Make sure \'protocolUseSSL\' and \'urlAddPort\' or \'CMD_PROTOCOL_USESSL\' and \'CMD_URL_ADDPORT\' are configured properly.') +} + config.Environment = Environment // auth method