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);