diff options
Diffstat (limited to 'server/middlewares/robots.ts')
-rw-r--r-- | server/middlewares/robots.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/server/middlewares/robots.ts b/server/middlewares/robots.ts new file mode 100644 index 000000000..b22b24a9f --- /dev/null +++ b/server/middlewares/robots.ts | |||
@@ -0,0 +1,13 @@ | |||
1 | import express from 'express' | ||
2 | |||
3 | function disableRobots (req: express.Request, res: express.Response, next: express.NextFunction) { | ||
4 | res.setHeader('X-Robots-Tag', 'noindex') | ||
5 | |||
6 | return next() | ||
7 | } | ||
8 | |||
9 | // --------------------------------------------------------------------------- | ||
10 | |||
11 | export { | ||
12 | disableRobots | ||
13 | } | ||