File size: 268 Bytes
9705b6c |
1 2 3 4 5 6 7 8 9 10 11 |
function validateRegistration(req, res, next) {
const setting = process.env.ALLOW_REGISTRATION?.toLowerCase();
if (setting === 'true') {
next();
} else {
res.status(403).send('Registration is not allowed.');
}
}
module.exports = validateRegistration;
|