summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-03 16:06:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-03 16:06:54 +0100
commite34ec0a138f8f8d2792c595f7a20e3dd8efc6b28 (patch)
tree055b72c4fb5530cee415262bf4e8f311ba1907ad /core
parentab1c79827e627a4d72194842f98b5bae1185a4b2 (diff)
parent4bb96a55536d51a0e8bde498f88be3eaea6a906b (diff)
downloadnextcloud-server-e34ec0a138f8f8d2792c595f7a20e3dd8efc6b28.tar.gz
nextcloud-server-e34ec0a138f8f8d2792c595f7a20e3dd8efc6b28.zip
Merge pull request #22095 from owncloud/public_link_with_port
Public link downloads should work on instance on non default port
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js
index bc8c51e40d3..83658a537b8 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -243,9 +243,15 @@ var OC={
},
/**
- * Returns the host name used to access this ownCloud instance
+ * Returns the host used to access this ownCloud instance
+ * Host is sometimes the same as the hostname but now always.
*
- * @return {string} host name
+ * Examples:
+ * http://example.com => example.com
+ * https://example.com => exmaple.com
+ * http://example.com:8080 => example.com:8080
+ *
+ * @return {string} host
*
* @since 8.2
*/
@@ -254,6 +260,17 @@ var OC={
},
/**
+ * Returns the hostname used to access this ownCloud instance
+ * The hostname is always stripped of the port
+ *
+ * @return {string} hostname
+ * @since 9.0
+ */
+ getHostName: function() {
+ return window.location.hostname;
+ },
+
+ /**
* Returns the port number used to access this ownCloud instance
*
* @return {int} port number