Add object to Nginx api configuration

master
andryyy 2017-04-26 23:37:55 +02:00
parent fd84b2ffa9
commit a03b36e0c3
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ server {
location /api/v1/ { location /api/v1/ {
try_files $uri $uri/ /json_api.php?$args; try_files $uri $uri/ /json_api.php?$args;
} }
rewrite ^/api/v1/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&object=$2? last; rewrite ^/api/v1/([^/]+)/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&cat=$2&object=$3? last;
location ^~ /.well-known/acme-challenge/ { location ^~ /.well-known/acme-challenge/ {
allow all; allow all;
@ -170,7 +170,7 @@ server {
location /api/v1/ { location /api/v1/ {
try_files $uri $uri/ /json_api.php?$args; try_files $uri $uri/ /json_api.php?$args;
} }
rewrite ^/api/v1/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&object=$2? last; rewrite ^/api/v1/([^/]+)/([^/]+)/([^/]+)/?$ /json_api.php?action=$1&cat=$2&object=$3? last;
location ^~ /.well-known/acme-challenge/ { location ^~ /.well-known/acme-challenge/ {
allow all; allow all;