1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fixes #1524 - site.js determines the server address wrong

This commit is contained in:
Luke Pulverenti 2016-03-24 01:48:24 -04:00
parent 3acf184be7
commit bb9b9377fd

View file

@ -113,10 +113,7 @@ var Dashboard = {
// Try to get the server address from the browser url // Try to get the server address from the browser url
// This will preserve protocol, hostname, port and subdirectory // This will preserve protocol, hostname, port and subdirectory
var urlLower = window.location.href.toLowerCase(); var urlLower = window.location.href.toLowerCase();
var index = urlLower.indexOf('/web'); var index = urlLower.lastIndexOf('/web');
if (index == -1) {
index = urlLower.indexOf('/dashboard');
}
if (index != -1) { if (index != -1) {
return urlLower.substring(0, index); return urlLower.substring(0, index);