mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
fix possible issue with server detection
This commit is contained in:
parent
415e48d87f
commit
3c52b8fcd4
@ -31,9 +31,12 @@ export async function serverAddress() {
|
||||
const urls = [];
|
||||
urls.push(window.location.origin);
|
||||
urls.push(`https://${window.location.hostname}:8920`);
|
||||
urls.push(`http://${window.location.hostname}:8096`);
|
||||
urls.push(...await webSettings.getServers());
|
||||
|
||||
if (window.location.protocol === 'http') {
|
||||
urls.push(`http://${window.location.hostname}:8096`);
|
||||
}
|
||||
|
||||
const promises = urls.map(url => {
|
||||
return fetch(`${url}/System/Info/Public`).then(resp => url).catch(error => {
|
||||
return Promise.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user