telize

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

commit 108d5b490a581ce55f8196fe87f1557fd43926df
parent 656fa2e21d484289974bd4b0dbf8a3927a328aba
Author: Frederic Cambus <fred@statdns.com>
Date:   Sat, 28 Sep 2019 18:58:54 +0200

Move routes to their own configuration file.

Diffstat:
Aconf/routes.conf | 33+++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+), 0 deletions(-)

diff --git a/conf/routes.conf b/conf/routes.conf @@ -0,0 +1,33 @@ +static /ip request_ip +static /jsonip request_json_ip +static /geoip request_location +dynamic ^/geoip/[a-f0-9\:.]*$ request_location +static /location request_location +dynamic ^/location/[a-f0-9\:.]*$ request_location + +restrict /ip get head +restrict /jsonip get head +restrict /geoip get head +restrict ^/geoip/[a-f0-9\:.]*$ get head +restrict /location get head +restrict ^/location/[a-f0-9\:.]*$ get head + +params qs:get /jsonip { + validate callback v_callback +} + +params qs:get /geoip { + validate callback v_callback +} + +params qs:get ^/geoip/[a-f0-9\:.]*$ { + validate callback v_callback +} + +params qs:get /location { + validate callback v_callback +} + +params qs:get ^/location/[a-f0-9\:.]*$ { + validate callback v_callback +}