@bonniernews/no-ai-robots
v0.0.5
Published
Express middleware for blocking ai-robots
Downloads
2,439
Maintainers
Keywords
Readme
no-ai-robots
Contains a robots.txt
with deny directives for known AI robots.
Blocked robots
See robots.txt
Usage with express
const noRobots = require("@bonniernews/no-ai-robots");
function noRobotsMiddleware(req, res) {
res.set("Cache-Control", "max-age=300");
res.set("Content-Type", "text/plain; charset=utf-8");
return res.send(`${noRobots}
Sitemap: https://epic-site/sitemap.xml
`);
}
app.use("/robots.txt", noRobotsMiddleware);