diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-11-23 12:48:54 +0100 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-11-23 12:48:54 +0100 |
commit | f359c2a716d69144c15fe9af856d8d985def8416 (patch) | |
tree | 6d04aeb8b95a5f4d406ab16a7e9967a180402d90 /lib | |
parent | 3e20032a322f4f97931eca7fbad3416d4b5fb6c4 (diff) | |
download | nextcloud-server-f359c2a716d69144c15fe9af856d8d985def8416.tar.gz nextcloud-server-f359c2a716d69144c15fe9af856d8d985def8416.zip |
backport pullrequest #554
better reverse proxy support
Diffstat (limited to 'lib')
-rw-r--r-- | lib/request.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/request.php b/lib/request.php index 87262d98625..10a03a2870a 100644 --- a/lib/request.php +++ b/lib/request.php @@ -18,6 +18,9 @@ class OC_Request { if(OC::$CLI) { return 'localhost'; } + if(OC_Config::getValue('overwritehost', '')<>''){ + return OC_Config::getValue('overwritehost'); + } if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { if (strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ",") !== false) { $host = trim(array_pop(explode(",", $_SERVER['HTTP_X_FORWARDED_HOST']))); @@ -40,6 +43,9 @@ class OC_Request { * Returns the server protocol. It respects reverse proxy servers and load balancers */ public static function serverProtocol() { + if(OC_Config::getValue('overwriteprotocol', '')<>''){ + return OC_Config::getValue('overwriteprotocol'); + } if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) { $proto = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']); }else{ |