connect-purgatory
Connect middleware to define a whitelist/blacklist of IPv4 ranges.
Instalation & Usage
In the terminal inside the project's folder.
npm install connect-purgatory --save
then in the server's file:
var http = connect = purgatory = ; var server = ; http ;
Credits
thanks to @gnclmorais & @carlosdavidepto for helping understanding IP ranges and for providing a model function to verify if an IP belong to a range.