Plack::Middleware::IPAddressFilter - Simple IP address access control middleware
use Plack::Builder; my $app = sub { ... }; builder { enable "IPAddressFilter", rules [ # deny from all for default. '+ 127.0.0.1', # allow from localhost. '+ 192.168.0.0/24', # allow from LAN '- 192.168.0.5-192.168.0.10', # except from some hosts. '+ 192.0.34.72/255.255.255.240', # allow from subnet. ]; $app; }
Plack::Middleware::IPAddressFilter is a IP address based access control handler for Plack.
IP address ranges to allow/deny. '-' prepended ranges are denied,'+' prepended or prepend less are allowd.
Rintaro Ishizaki <rintaro@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Plack::Middleware::IPAddressFilter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::IPAddressFilter
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::IPAddressFilter
For more information on module installation, please visit the detailed CPAN module installation guide.