mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
fix http auth env var
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user