fix(supabase): use internal URL for all server-side clients with cookie name matching
ROOT CAUSE FIX: All server-side Supabase clients (server-client, middleware-client, server-admin-client) now use SUPABASE_INTERNAL_URL (http://supabase-kong:8000) when available, with cookieOptions.name set to match the external URL's cookie key (e.g. sb-myeasycms-auth-token). This gives us: - Reliable Docker-internal networking (no hairpin NAT through Traefik) - Correct session cookie matching between browser and server - No more 500 errors on SSR pages that query Supabase Reverted per-page try/catch workarounds since root cause is now fixed.
This commit is contained in:
@@ -22,14 +22,7 @@ export default async function VerbandPage({ params }: PageProps) {
|
||||
if (!acct) return <AccountNotFound />;
|
||||
|
||||
const api = createVerbandApi(client);
|
||||
|
||||
let stats = { totalClubs: 0, totalMembers: 0, totalRoles: 0, totalFeeTypes: 0 };
|
||||
|
||||
try {
|
||||
stats = await api.getDashboardStats(acct.id);
|
||||
} catch (e) {
|
||||
console.error('Failed to load verband dashboard:', e);
|
||||
}
|
||||
const stats = await api.getDashboardStats(acct.id);
|
||||
|
||||
return (
|
||||
<CmsPageShell account={account} title="Verbandsverwaltung">
|
||||
|
||||
Reference in New Issue
Block a user