WIP(shops): safer debug mode

This commit is contained in:
Sabe Jones
2024-05-21 09:11:18 -05:00
parent 36b589e92d
commit c0d6338eba
16 changed files with 118 additions and 90 deletions

View File

@@ -0,0 +1,12 @@
import nconf from 'nconf';
import {
NotFound,
} from '../libs/errors';
export default function ensureDevelopmentMode (req, res, next) {
if (nconf.get('DEBUG_ENABLED') && nconf.get('BASE_URL') !== 'https://habitica.com') {
next();
} else {
next(new NotFound());
}
}