summary refs log tree commit diff
path: root/webclient/login/register-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'webclient/login/register-controller.js')
-rw-r--r--webclient/login/register-controller.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/webclient/login/register-controller.js b/webclient/login/register-controller.js
index 6c1bfd632a..d4fb9add70 100644
--- a/webclient/login/register-controller.js
+++ b/webclient/login/register-controller.js
@@ -8,7 +8,10 @@ angular.module('RegisterController', ['matrixService'])
     // Assume that this is hosted on the home server, in which case the URL
     // contains the home server.
     var hs_url = $location.protocol() + "://" + $location.host();
-    if ($location.port()) {
+    if ($location.port() &&
+        !($location.protocol() === "http" && $location.port() === 80) &&
+        !($location.protocol() === "https" && $location.port() === 443))
+    {
         hs_url += ":" + $location.port();
     }