1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
Co-authored-by: dkanada <dkanada@users.noreply.github.com>
This commit is contained in:
hawken 2020-11-26 16:46:55 +01:00 committed by Håkon Struijk Holmen
parent c2e92111c1
commit ae4e1814c1

View file

@ -31,13 +31,13 @@ export async function serverAddress() {
// Use servers specified in config.json
const urls = await webSettings.getServers();
// Otherwise, use computed base-url
// Otherwise use computed base URL
if (urls.length == 0) {
const index = window.location.href.toLowerCase().lastIndexOf('/web');
if (index != -1) {
urls.push(window.location.href.substring(0, index));
} else {
// fall back to location without path
// fallback to location without path
urls.push(window.location.origin);
}
}