if (!match) {
// MUST redirect to a page where the web server serves an actual 404 error (i.e. not just
// index.html again) otherwise this triggers an infinite loop
- window.location.href = `${window.location.protocol}//${window.location.host}/errors/NotFound`;
+ window.location.href = `${window.location.origin}/errors/NotFound`;
}
}
return;
}
- const base = new URL(`${window.location.protocol}//${window.location.host}`);
+ const base = new URL(`${window.location.origin}`);
const url = new URL(path, base);
window.history.pushState({}, '', url);