mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
Add middleware to ignore requests for robots*.txt files
This commit is contained in:
@ -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);
|
setupSwaggerAuthentication(app);
|
||||||
|
|
||||||
app.useGlobalPipes(
|
app.useGlobalPipes(
|
||||||
|
Reference in New Issue
Block a user