Add middleware to ignore requests for robots*.txt files

This commit is contained in:
faris Aljohari
2025-02-17 18:43:43 -06:00
parent 9d8287b82b
commit 030e6ae902

View File

@ -31,6 +31,14 @@ async function bootstrap() {
}),
);
// Middleware to ignore requests for robots*.txt files
app.use((req, res, next) => {
if (req.path.match(/^\/robots\d*\.txt$/)) {
return res.status(404).send('Not Found');
}
next();
});
setupSwaggerAuthentication(app);
app.useGlobalPipes(