From 8b7e3c718d034c5a509c63439b4a0de27afb8bf2 Mon Sep 17 00:00:00 2001 From: andryyy Date: Tue, 28 Mar 2017 11:51:31 +0200 Subject: [PATCH] API format changes --- data/conf/nginx/site.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/data/conf/nginx/site.conf b/data/conf/nginx/site.conf index d724b4f2..a78c483f 100644 --- a/data/conf/nginx/site.conf +++ b/data/conf/nginx/site.conf @@ -18,6 +18,11 @@ server { access_log /var/log/nginx/access.log; root /web; + location /api/v1/ { + try_files $uri $uri/ /json_api.php?$args; + } + rewrite ^/api/v1/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&object=$2? last; + location ^~ /.well-known/acme-challenge/ { allow all; default_type "text/plain"; @@ -166,6 +171,11 @@ server { access_log /var/log/nginx/access.log; root /web; + location /api/v1/ { + try_files $uri $uri/ /json_api.php?$args; + } + rewrite ^/api/v1/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&object=$2? last; + location ^~ /.well-known/acme-challenge/ { allow all; default_type "text/plain";