Newly Practicing Mortician

    connect-is-bot

    1.0.1 • Public • Published

    connect-is-bot

    adds isBot to the request, when requested from a bot, search engine, spider or the like.

    install

    npm install connect-is-bot --save

    usage

    var isBot = require('connect-is-bot');
    app.use(isBot());

    -> it adds the attribute req.isBot to every request that comes from a bot, search engine, spider or the like. e.g. when a request contains the 'user-agent' header:

    "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" ,

    the property req.isBot is set to true.

    credits

    it uses the is-bot module from gjohnson.

    Install

    npm i connect-is-bot

    DownloadsWeekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • andineck