From 8441b0a3d6cc9bc87d06b735a332dc047e2842f4 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Sun, 9 Dec 2018 20:12:50 +0100 Subject: [PATCH] fix http auth env var --- website/server/middlewares/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/server/middlewares/index.js b/website/server/middlewares/index.js index 9c9318cb65..0ca550f7c4 100644 --- a/website/server/middlewares/index.js +++ b/website/server/middlewares/index.js @@ -30,7 +30,7 @@ import basicAuth from 'express-basic-auth'; const IS_PROD = nconf.get('IS_PROD'); const DISABLE_LOGGING = nconf.get('DISABLE_REQUEST_LOGGING') === 'true'; -const ENABLE_HTTP_AUTH = nconf.get('SITE_HTTP_AUTH:ENABLED') === 'true'; +const ENABLE_HTTP_AUTH = nconf.get('SITE_HTTP_AUTH_ENABLED') === 'true'; // const PUBLIC_DIR = path.join(__dirname, '/../../client'); const SESSION_SECRET = nconf.get('SESSION_SECRET'); @@ -79,7 +79,7 @@ module.exports = function attachMiddlewares (app, server) { // The site can require basic HTTP authentication to be accessed if (ENABLE_HTTP_AUTH) { const httpBasicAuthUsers = {}; - httpBasicAuthUsers[nconf.get('SITE_HTTP_AUTH:USERNAME')] = nconf.get('SITE_HTTP_AUTH:PASSWORD'); + httpBasicAuthUsers[nconf.get('SITE_HTTP_AUTH_USERNAME')] = nconf.get('SITE_HTTP_AUTH_PASSWORD'); app.use(basicAuth({ users: httpBasicAuthUsers,