@bambulabs/hapi-blockip
v0.1.3
Published
A simple Hapi.js plugin to block pre-defined IP addresses.
Downloads
5
Readme
hapi-blockip
hapi-blockip is a hapi plugin for blocking IP addresses.
What hapi-blockip does?
hapi-blockip responses to the requests coming from blocked IP addreses with 403.
Installation
npm i @bambulabs/hapi-blockip
Usage
const HapiBlockIP = require("@bambulabs/hapi-blockip");
await server.register({
plugin: HapiBlockIP,
options: {
blocklist: ["127.0.0.1"]
}
});
Support
hapi-blockip supports IPV4 and IPV6.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.