fix: resolve client-side connection timeout by stripping internal port 8000 on Supabase URL rewriting
All checks were successful
Staging Build / build (push) Successful in 2m36s

This commit is contained in:
DanielS
2026-06-24 11:00:44 +02:00
parent 0968f1a753
commit f2db40fa36

View File

@@ -20,6 +20,7 @@ export function resolveSupabaseUrl(url: string | undefined): string | undefined
if (parsed.hostname === 'supabase-kong' || parsed.hostname === 'kong') {
parsed.hostname = window.location.hostname;
parsed.protocol = window.location.protocol;
parsed.port = ''; // Port entfernen, da der öffentliche Zugriff über Port 80/443 läuft
return parsed.toString().replace(/\/$/, '');
}
@@ -30,6 +31,8 @@ export function resolveSupabaseUrl(url: string | undefined): string | undefined
}
} catch {
let resolved = url
.replace('//supabase-kong:8000', `//${window.location.hostname}`)
.replace('//kong:8000', `//${window.location.hostname}`)
.replace('//supabase-kong', `//${window.location.hostname}`)
.replace('//kong', `//${window.location.hostname}`);
if (window.location.protocol === 'https:') {