summaryrefslogtreecommitdiffstats
path: root/lib/public/util.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-06-01 10:38:44 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-06-01 10:38:44 +0200
commit24d14783d7b4706a3ad374a2229271f8f422e9cd (patch)
tree92496f1e07d1b8e29d818b0c63b6f9e6fcd60304 /lib/public/util.php
parentbaae4c741ded1c702369c1a513b08324a63985f5 (diff)
downloadnextcloud-server-24d14783d7b4706a3ad374a2229271f8f422e9cd.tar.gz
nextcloud-server-24d14783d7b4706a3ad374a2229271f8f422e9cd.zip
added a serverProtocol function that correctly returns the used protocol even if the ssl connection is terminated at a reverse_proxy or at a load balancer
Diffstat (limited to 'lib/public/util.php')
-rw-r--r--lib/public/util.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/public/util.php b/lib/public/util.php
index 39a185d02a7..9b499574da1 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -169,6 +169,16 @@ class Util {
}
/**
+ * @brief Returns the server protocol
+ * @returns the server protocol
+ *
+ * Returns the server protocol. It respects reverse proxy servers and load balancers
+ */
+ public static function getServerProtocol() {
+ return(\OC_Helper::serverProtocol());
+ }
+
+ /**
* @brief Creates path to an image
* @param $app app
* @param $image image name