mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 08:12:00 +02:00
12 lines
240 B
JavaScript
12 lines
240 B
JavaScript
![]() |
const noIndex = (req, res, next) => {
|
||
|
const shouldNoIndex = process.env.NO_INDEX ? process.env.NO_INDEX === 'true' : true;
|
||
|
|
||
|
if (shouldNoIndex) {
|
||
|
res.setHeader('X-Robots-Tag', 'noindex');
|
||
|
}
|
||
|
|
||
|
next();
|
||
|
};
|
||
|
|
||
|
module.exports = noIndex;
|