summaryrefslogtreecommitdiffstats
path: root/lib/request.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/request.php')
-rwxr-xr-x[-rw-r--r--]lib/request.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/request.php b/lib/request.php
index 287d20d1a5d..c975c84a711 100644..100755
--- 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{