From bb9b9377fdbf03a971f4d0f14b53731e0c48f8e9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 24 Mar 2016 01:48:24 -0400 Subject: [PATCH] fixes #1524 - site.js determines the server address wrong --- dashboard-ui/scripts/site.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 8b6aa6aac3..a61f11f300 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -113,10 +113,7 @@ var Dashboard = { // Try to get the server address from the browser url // This will preserve protocol, hostname, port and subdirectory var urlLower = window.location.href.toLowerCase(); - var index = urlLower.indexOf('/web'); - if (index == -1) { - index = urlLower.indexOf('/dashboard'); - } + var index = urlLower.lastIndexOf('/web'); if (index != -1) { return urlLower.substring(0, index);