telize

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

commit 1e4f188503df6ea43ba2a39c083fc4bc298b792a
parent e822ecd90a6d2f5462ee1d1125d7cb3a164d9f29
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Tue, 27 Oct 2015 17:30:27 +0100

Formatting fixes

Diffstat:
MAUTHORS | 12++++++------
MREADME.md | 20++++++++++----------
MTODO | 2+-
Mtelize | 2+-
4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/AUTHORS b/AUTHORS @@ -1,6 +1,6 @@ -Telize is developed by : - -Frederic Cambus <fcambus AT users DOT sourceforge DOT net> - -Site : http://www.cambus.net -Twitter : @fcambus +Telize is developed by : + +Frederic Cambus <fcambus AT users DOT sourceforge DOT net> + +Site : http://www.cambus.net +Twitter : @fcambus diff --git a/README.md b/README.md @@ -11,7 +11,7 @@ <0(--- \__/ -h7- \______/ \ . \__/ ---- \______/ --(0> \ .\ /. . \ .\ // / - \______\\ //______/ + \______\\ //______/ Y ## Description @@ -45,10 +45,10 @@ For maximum performance, please make sure the HttpLuaModule is compiled against Telize requires the following Lua module : -- Lua CJSON +- Lua CJSON - Lua iconv -Installing via LuaRocks : +Installing via LuaRocks : luarocks install lua-cjson luarocks install lua-iconv @@ -83,7 +83,7 @@ Copy `timezone.conf` and `timezone-offset.conf` in the Nginx configuration files Edit `nginx.conf` to include `timezone.conf`, `timezone-offset.conf` and to add directives specifying the path to the GeoIP database files, within the http block. -#### For IPv4 support only : +#### For IPv4 support only http { @@ -97,7 +97,7 @@ Edit `nginx.conf` to include `timezone.conf`, `timezone-offset.conf` and to add geoip_org /usr/share/GeoIP/GeoIPASNum.dat; } -#### For IPv4 and IPv6 support (requires at least Nginx 1.3.12) : +#### For IPv4 and IPv6 support (requires at least Nginx 1.3.12) http { @@ -142,28 +142,28 @@ By the following directive : proxy_set_header X-Forwarded-For $ip; -## CORS Support (Cross-origin resource sharing) +## CORS Support (Cross-origin resource sharing) Telize has CORS enabled by default since version 1.02. The following variables defines CORS behavior, within the `telize` configuration file. set $cors "true"; set $cors_origin "*"; -## Usage +## Usage For complete API documentation and JavaScript API usage examples, please check the project site : http://www.telize.com -### Get IP address in Plain text format : +### Get IP address in Plain text format - Example : http://www.telize.com/ip -### Get IP address in JSON format : +### Get IP address in JSON format - Example (JSON) : http://www.telize.com/jsonip - Example (JSONP) : http://www.telize.com/jsonip?callback=getip -### Get IP address location in JSON format : +### Get IP address location in JSON format Calling the API endpoint without any parameter will return the visitor IP address : diff --git a/TODO b/TODO @@ -1,3 +1,3 @@ - Document time zone offsets : http://en.wikipedia.org/wiki/List_of_UTC_time_offsets -- Force UTF-8 encoding of GeoIP variables directly in Nginx to drop dependency on +- Force UTF-8 encoding of GeoIP variables directly in Nginx to drop dependency on Lua iconv module diff --git a/telize b/telize @@ -96,7 +96,7 @@ server { end -- Splitting GeoIP organization string into ASN and ISP - if ngx.var.geoip_org then + if ngx.var.geoip_org then index = string.find(ngx.var.geoip_org, "%s") asn = string.sub(ngx.var.geoip_org, 0, index-1) isp = string.sub(ngx.var.geoip_org, index+1)