mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 08:54:17 -04:00
Updated .dockerignore to remove unneeded files from container build. Updated docker-compose.yml with new environment variables. Updated README.md. Updated project description. Replaced DISABLE_AUTH with AUTH_DISABLE. Replaced SECURITY_CODE with AUTH_PASSWORD. Implemented AUTH_TOKEN for api authentication. Added migration guide.
This commit is contained in:
@@ -6,7 +6,7 @@ const jwt = require('../modules/jwt');
|
||||
/**
|
||||
* Global variables
|
||||
*/
|
||||
const authDisabled = (process.env.DISABLE_AUTH === 'true') || false;
|
||||
const authDisabled = (process.env.AUTH_DISABLE === 'true') || false;
|
||||
|
||||
/**
|
||||
* Verifies if a user is signed in
|
||||
@@ -68,7 +68,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
// Check if password is correct
|
||||
const passwordCheck = req.headers.authorization === `Bearer ${(process.env.SECURITY_CODE || "0000")}`;
|
||||
const passwordCheck = req.headers.authorization === `Bearer ${(process.env.AUTH_TOKEN || "0000")}`;
|
||||
if (!passwordCheck) {
|
||||
res.status(403).json({
|
||||
error: 'Forbidden',
|
||||
|
||||
Reference in New Issue
Block a user