[eric] test: exhaustive invariant suite for the exp.1 fixes; it found a multi-slash proxy URL bug on first run

This commit is contained in:
ciregenz
2026-08-12 18:48:05 -07:00
parent e4f2a0a01a
commit 33b1d9d8e3
2 changed files with 3 additions and 1 deletions
Binary file not shown.
+3 -1
View File
@@ -15,5 +15,7 @@ export function isUsableInstallId(id: string | undefined | null): boolean {
export function googleStartUrl(proxyUrl: string, installId: string, localPort: number): string | null {
if (!isUsableInstallId(installId)) return null;
const params = new URLSearchParams({ install_id: installId, local_port: String(localPort) });
return `${proxyUrl.replace(/\/$/, '')}/api/auth/google/start?${params.toString()}`;
// Strip ALL trailing slashes, not one: a settings value ending "com//" produced the path
// "//api/auth/google/start", which is a different path to any server that normalises strictly.
return `${proxyUrl.replace(/\/+$/, '')}/api/auth/google/start?${params.toString()}`;
}