diff --git a/src/main.ts b/src/main.ts index 6dbfc45..914d41b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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(