summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/config/index.js4
-rw-r--r--lib/web/auth/oauth2/index.js4
-rw-r--r--lib/web/auth/openid/index.js4
3 files changed, 8 insertions, 4 deletions
diff --git a/lib/config/index.js b/lib/config/index.js
index c1005b0b..b8480966 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
diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js
index b9160f6e..57ab9b9a 100644
--- a/lib/web/auth/oauth2/index.js
+++ b/lib/web/auth/oauth2/index.js
@@ -100,7 +100,7 @@ oauth2Auth.get('/auth/oauth2', function (req, res, next) {
// github auth callback
oauth2Auth.get('/auth/oauth2/callback',
passport.authenticate('oauth2', {
- successReturnToOrRedirect: config.serverurl + '/',
- failureRedirect: config.serverurl + '/'
+ successReturnToOrRedirect: config.serverURL + '/',
+ failureRedirect: config.serverURL + '/'
})
)
diff --git a/lib/web/auth/openid/index.js b/lib/web/auth/openid/index.js
index 96f61807..c45c6d71 100644
--- a/lib/web/auth/openid/index.js
+++ b/lib/web/auth/openid/index.js
@@ -55,7 +55,7 @@ openIDAuth.post('/auth/openid', urlencodedParser, function (req, res, next) {
// openID auth callback
openIDAuth.get('/auth/openid/callback',
passport.authenticate('openid', {
- successReturnToOrRedirect: config.serverurl + '/',
- failureRedirect: config.serverurl + '/'
+ successReturnToOrRedirect: config.serverURL + '/',
+ failureRedirect: config.serverURL + '/'
})
)