From 20c5471a89325717340536af476e1da67555509d Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Tue, 28 Oct 2014 12:05:07 +0000 Subject: [PATCH] expose the ownCloud API, fixes #240, fixes #242 --- conf/nginx-primaryonly.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/nginx-primaryonly.conf b/conf/nginx-primaryonly.conf index 56307ee5..b87e45f0 100644 --- a/conf/nginx-primaryonly.conf +++ b/conf/nginx-primaryonly.conf @@ -18,8 +18,12 @@ deny all; } } - location ~ ^(/cloud)(/[^/]+\.php)(/.*)?$ { + location ~ ^(/cloud)((?:/ocs)?/[^/]+\.php)(/.*)?$ { # note: ~ has precendence over a regular location block + # Accept URLs like: + # /cloud/index.php/apps/files/ + # /cloud/index.php/apps/files/ajax/scan.php (it's really index.php; see 6fdef379adfdeac86cc2220209bdf4eb9562268d) + # /cloud/ocs/v1.php/apps/files_sharing/api/v1 (see #240) include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/lib/owncloud/$2; fastcgi_param SCRIPT_NAME $1$2;