Fix trust center SPA asset loading on custom domains

The base tag was only set for /trust/{slug} paths, causing asset requests on custom domains to resolve relative to the page URL instead of root, resulting in 404 fallback to index.html.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-20 17:35:10 +01:00
parent 193125f619
commit 8142637e79

View File

@@ -6,11 +6,9 @@
<script>
(function () {
var m = location.pathname.match(/^\/trust\/[^/]+/);
if (m) {
var b = document.createElement("base");
b.href = m[0] + "/";
document.head.appendChild(b);
}
var b = document.createElement("base");
b.href = m ? m[0] + "/" : "/";
document.head.appendChild(b);
})();
</script>