diff --git a/frontend/app/components/header.tsx b/frontend/app/components/header.tsx index 4b33842..81553ec 100644 --- a/frontend/app/components/header.tsx +++ b/frontend/app/components/header.tsx @@ -140,7 +140,9 @@ export default function Header() { const { data: apiStatus, error: apiError } = useSWR(healthcheck_api, async (url) => { try { // Fetch the data - const response = await fetch(url); + const response = await fetch(url, { + signal: AbortSignal.timeout(5000), // Abort the request if it takes longer than 5 seconds + }); if (!response.ok) { throw new Error(response.statusText || 'Unknown Error'); }