Update fetch call to check API reachability

the original version of this code calls "https://jellyfin.domain.tld". this works for most people. some people however don't have a properly set up reverse proxy. by adding a forward slash, we remove the issue for users who have reverse proxies that don't redirect from   "https://jellyfin.domain.tld" to "https://jellyfin.domain.tld/"
This commit is contained in:
Simon Eklundh
2026-01-04 12:34:23 +01:00
committed by GitHub
parent bd4e5bb70a
commit 8e0bafae81

View File

@@ -24,7 +24,7 @@ const NetworkStatusContext = createContext<NetworkStatusContextType | null>(
async function checkApiReachable(basePath?: string): Promise<boolean> { async function checkApiReachable(basePath?: string): Promise<boolean> {
if (!basePath) return false; if (!basePath) return false;
try { try {
const response = await fetch(basePath, { method: "HEAD" }); const response = await fetch(basePath + "/", { method: "HEAD" });
return response.ok; return response.ok;
} catch { } catch {
return false; return false;