mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
11 lines
268 B
JavaScript
11 lines
268 B
JavaScript
|
|
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;
|