Socket
Socket
Sign inDemoInstall

connect-is-bot

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    connect-is-bot

adds `isBot` to the request, when requested from a bot, search engine, spider etc.


Version published
Maintainers
1
Install size
5.27 kB
Created

Readme

Source

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.

Keywords

FAQs

Last updated on 06 Oct 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc