summaryrefslogtreecommitdiff
path: root/lib/config/index.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/config/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/config/index.js b/lib/config/index.js
index c1005b0b..e5d02dc1 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
@@ -124,7 +128,7 @@ if (config.gitlab && config.gitlab.version !== 'v4' && config.gitlab.version !==
config.gitlab.version = 'v4'
}
// If gitlab scope is api, enable snippets Export/import
-config.isGitlabSnippetsEnable = (!config.gitlab.scope || config.gitlab.scope === 'api')
+config.isGitlabSnippetsEnable = (!config.gitlab.scope || config.gitlab.scope === 'api') && config.isGitLabEnable
// Only update i18n files in development setups
config.updateI18nFiles = (env === Environment.development)
@@ -161,7 +165,7 @@ if (config.sessionSecret === 'secret') {
// Validate upload upload providers
if (['filesystem', 's3', 'minio', 'imgur', 'azure'].indexOf(config.imageUploadType) === -1) {
- logger.error('"imageuploadtype" is not correctly set. Please use "filesystem", "s3", "minio", "azure" or "imgur". Defaulting to "imgur"')
+ logger.error('"imageuploadtype" is not correctly set. Please use "filesystem", "s3", "minio", "azure" or "imgur". Defaulting to "filesystem"')
config.imageUploadType = 'filesystem'
}