Frontend Service: Client side redirect to custom domain (#113717)

* handle redirect in frontend service

* add comments
This commit is contained in:
Ashley Harrison
2025-11-13 03:32:14 +00:00
committed by GitHub
parent 6c8c4c32b5
commit 3563388d4d
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -220,6 +220,16 @@
}
const resp = await fetch(bootDataUrl);
// manual redirect for custom domains
// see pkg/middleware/validate_host.go
if (resp.status === 204) {
const redirectDomain = resp.headers.get('Redirect-Domain');
if (redirectDomain) {
window.location.hostname = redirectDomain;
return;
}
}
const textResponse = await resp.text();
let rawBootData;