mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
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:
@@ -24,7 +24,7 @@ const NetworkStatusContext = createContext<NetworkStatusContextType | null>(
|
||||
async function checkApiReachable(basePath?: string): Promise<boolean> {
|
||||
if (!basePath) return false;
|
||||
try {
|
||||
const response = await fetch(basePath, { method: "HEAD" });
|
||||
const response = await fetch(basePath + "/", { method: "HEAD" });
|
||||
return response.ok;
|
||||
} catch {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user