Socket
Socket
Sign inDemoInstall

connect-block

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    connect-block

block agents


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Install size
9.01 kB
Created
Weekly downloads
 

Readme

Source

Best browser compatible solution!

A middleware for connect

var block = require('connect-block');
connect(
    block('IE8'), //you can use IE, IE6, IE7, IE8, IE9, IE10 or RegExp
    block({agent: ['google'], text: 'Goodbye'), // block google bot
    function(req, res){
      res.end('You have passed.');
    }
).listen(3000);

If your browse this page in IE6,IE7,IE8 you will got:

Sorry! Your browser is not supported.

Choose another browser

Chrome | Firefox | Safari

And it supported Chinese and English now, other languages will treat as English.

FAQs

Last updated on 13 Apr 2012

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