block-ip-express
v1.0.0
Published
An IP blocker for Express
Downloads
8
Readme
Block any IP address
Install
npm install block-ip-express
Example Usage
const express = require('express');
const app = express();
const ipBlock = require('block-ip-express');
app.use(ipBlock([1.2.3.4, 5.6.7.8 /* Array of blocked IPs. Error 403 if IP of client is blocked */, optionalCustomMessageForBlockedIps]));
app.get('/', (req, res) {
res.status(200).send('Ip not blocked!');
});