Plack-Middleware-GeoIP
view release on metacpan or search on metacpan
NAME
Plack::Middleware::GeoIP - Find country and city of origin of a web
request
SYNOPSIS
# with Plack::Middleware::RealIP
enable 'Plack::Middleware::RealIP',
header => 'X-Forwarded-For',
trusted_proxy => [ qw(192.168.1.0/24 192.168.2.1) ];
enable 'Plack::Middleware::GeoIP',
GeoIPDBFile => [ '/path/to/GeoIP.dat', '/path/to/GeoIPCity.dat' ],
GeoIPEnableUTF8 => 1;
DESCRIPTION
Plack::Middleware::GeoIP is a loose port of the Apache module mod_geoip.
It uses Geo::IP to lookup the country and city that a web request
originated from.
lib/Plack/Middleware/GeoIP.pm view on Meta::CPAN
1;
=head1 NAME
Plack::Middleware::GeoIP - Find country and city of origin of a web request
=head1 SYNOPSIS
# with Plack::Middleware::RealIP
enable 'Plack::Middleware::RealIP',
header => 'X-Forwarded-For',
trusted_proxy => [ qw(192.168.1.0/24 192.168.2.1) ];
enable 'Plack::Middleware::GeoIP',
GeoIPDBFile => [ '/path/to/GeoIP.dat', '/path/to/GeoIPCity.dat' ],
GeoIPEnableUTF8 => 1;
=head1 DESCRIPTION
Plack::Middleware::GeoIP is a loose port of the Apache module
mod_geoip. It uses Geo::IP to lookup the country and city that a web
request originated from.
lib/Plack/Middleware/GeoIP2.pm view on Meta::CPAN
1;
=head1 NAME
Plack::Middleware::GeoIP2 - Find country and city of origin of a web request
=head1 SYNOPSIS
# with Plack::Middleware::RealIP
enable 'Plack::Middleware::RealIP',
header => 'X-Forwarded-For',
trusted_proxy => [ qw(192.168.1.0/24 192.168.2.1) ];
enable 'Plack::Middleware::GeoIP',
GeoIP2DBFile => [ '/path/to/GeoLite2-Country.mmdb', '/path/to/GeoIP2-Country.mmdb' ];
=head1 DESCRIPTION
Plack::Middleware::GeoIP2 is a version of Plack::Middleware::GeoIP using
the more recent GeoIP2 library from MaxMind.
All requests are looked up and GEOIP_* variables are added to PSGI
( run in 0.388 second using v1.01-cache-2.11-cpan-4e96b696675 )