telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit de1480ac894af83fbbf044ebc55e411bc8fd6b67
parent 3a0cba483cc7e64f372c277f75a8b02969f89491
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon,  5 Feb 2018 12:52:42 +0100

Switch to $geoip2 variables

Diffstat:
Mtelize | 28+++++++++++++---------------
Mtimezone-offset.conf | 2+-
2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/telize b/telize @@ -103,21 +103,19 @@ server { local payload = { ip = ngx.var.remote_addr, - country_code = ngx.var.geoip_city_country_code, - country_code3 = ngx.var.geoip_city_country_code3, - country = ngx.var.geoip_city_country_name, - region = ngx.var.geoip_region_name, - region_code = ngx.var.geoip_region, - city = ngx.var.geoip_city, - postal_code = ngx.var.geoip_postal_code, - continent_code = ngx.var.geoip_city_continent_code, - latitude = ngx.var.geoip_latitude, - longitude = ngx.var.geoip_longitude, - dma_code = ngx.var.geoip_dma_code, - area_code = ngx.var.geoip_area_code, - organization = ngx.var.geoip_org, - timezone = ngx.var.geoip_timezone, - offset = ngx.var.geoip_timezone_offset, + continent_code = ngx.var.geoip2_continent_code, + country = ngx.var.geoip2_country, + country_code = ngx.var.geoip2_country_code, + region = ngx.var.geoip2_region, + region_code = ngx.var.geoip2_region_code, + city = ngx.var.geoip2_city, + postal_code = ngx.var.geoip2_postal_code, + latitude = ngx.var.geoip2_latitude, + longitude = ngx.var.geoip2_longitude, + timezone = ngx.var.geoip2_timezone, + offset = ngx.var.geoip2_timezone_offset, + asn = ngx.var.geoip2_asn, + organization = ngx.var.geoip2_organization, } local callback = ngx.var.arg_callback diff --git a/timezone-offset.conf b/timezone-offset.conf @@ -1,4 +1,4 @@ -map $geoip_timezone $geoip_timezone_offset { +map $geoip2_timezone $geoip2_timezone_offset { "Europe/Andorra" "2"; "Asia/Dubai" "4"; "Asia/Kabul" "4";