From ab2b79cda682a697baba2128a21d3a9b5e90853c Mon Sep 17 00:00:00 2001 From: Stefan Herbrechtsmeier Date: Sun, 9 Sep 2012 12:54:47 +0200 Subject: add multiple domains reverse proxy support Add support for a reverse proxy that handles multiple domains via different web roots (http[s]://proxy.tld/domain.tld/owncloud). As the reverse proxy web root is transparent for the web server the REQUEST_URI and SCRIPT_NAME need manual adjustments. This patch replace the direct use of this _SERVER variables with function calls and extend this functions to overwrite the web root. Additionally it adds a Sabre request backend that extends the Sabre_HTTP_Request to use the same functions. --- ocs/providers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ocs/providers.php') diff --git a/ocs/providers.php b/ocs/providers.php index 0c7cbaeff08..bf94b85dcfb 100644 --- a/ocs/providers.php +++ b/ocs/providers.php @@ -23,7 +23,7 @@ require_once '../lib/base.php'; -$url=OCP\Util::getServerProtocol().'://'.substr(OCP\Util::getServerHost().$_SERVER['REQUEST_URI'], 0, -17).'ocs/v1.php/'; +$url=OCP\Util::getServerProtocol().'://'.substr(OCP\Util::getServerHost().OCP\Util::getRequestUri(), 0, -17).'ocs/v1.php/'; echo(' -- cgit v1.2.3