hosiawak

Rack middleware submitted by hosiawak

Sort by: Latest | Highest rated

GeoIP Country Contest winner

Added by hosiawak at October 12, 2009 21:34 Star_smallStar_smallStar_smallStar_smallStar_small

Rack::GeoIPCountry uses the geoip gem and the GeoIP database to lookup the country of a request by its IP address.

The country data is then passed to the application as custom X_GEOIP_* headers. You can use the included Mapping class to trigger lookup only for certain requests (matching the given prefix).