浏览代码

Add object to Nginx api configuration

andryyy 8 年之前
父节点
当前提交
a03b36e0c3
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      data/conf/nginx/site.conf

+ 3 - 3
data/conf/nginx/site.conf

@@ -21,7 +21,7 @@ server {
   location /api/v1/ {
     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/ {
 	  allow all;
@@ -170,7 +170,7 @@ server {
   location /api/v1/ {
     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/ {
 	  allow all;
@@ -309,4 +309,4 @@ server {
     #alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
   }
 
-}
+}