mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-04 04:59:40 +00:00
fix http auth env var
This commit is contained in:
parent
0667695390
commit
8441b0a3d6
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue