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
All checks were successful
Staging Build / build (push) Successful in 2m36s
This commit is contained in:
@@ -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:') {
|
||||
|
||||
Reference in New Issue
Block a user