telize

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

commit 6aad8a60c3bad829bafa8749ed9a242aba1231a6
parent 62d9e7ea61515296132b2342e963e6072bab7744
Author: Frederic Cambus <fred@statdns.com>
Date:   Mon,  5 Mar 2018 16:10:01 +0100

Add support for CORS in the 'jsonip' endpoint

Diffstat:
Mtelize.conf | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/telize.conf b/telize.conf @@ -5,7 +5,7 @@ # https://www.telize.com # # # # Created: 2013-08-15 # -# Last Updated: 2018-03-02 # +# Last Updated: 2018-03-05 # # # # Telize is released under the BSD 2-Clause license. # # See LICENSE file for details. # @@ -43,6 +43,10 @@ server { charset utf-8; default_type application/json; + if ($cors = "true") { + add_header Access-Control-Allow-Origin $cors_origin; + } + content_by_lua_block { local cjson = require "cjson"