telize

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

commit e7e1b39ccc5b66aeda5c70a8c7e51e79618cc36e
parent 4febf6ab0ecf663595af42524fc010e094a11196
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon, 24 Oct 2016 16:31:35 +0200

Use Lua to echo IP address in the 'ip' endpoint and drop dependency on the 'ngx_echo' module

Diffstat:
MREADME.md | 1-
Mtelize | 2+-
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -30,7 +30,6 @@ Telize requires Nginx 1.7.4+ compiled with the following modules : - GeoIP (Optional HTTP modules : --with-http_geoip_module) - HttpRealipModule (Optional HTTP module : --with-http_realip_module) -- HttpEchoModule (Third party module (ngx_echo) : http://wiki.nginx.org/HttpEchoModule) - HttpLuaModule (Third party module (ngx_lua) : http://wiki.nginx.org/HttpLuaModule) If you are using Debian stable, the `nginx-extras` package have these diff --git a/telize b/telize @@ -34,7 +34,7 @@ server { charset off; default_type text/plain; - echo $remote_addr; + content_by_lua 'ngx.say(ngx.var.remote_addr)'; } location ~ /jsonip$ {