LibreChat / api /server /middleware /validateRegistration.js
N.Achyuth Reddy
Upload 683 files
9705b6c
raw
history blame contribute delete
268 Bytes
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;