fix: redirect docs in new page, handle 404 vercel url

This commit is contained in:
Rotimi Best
2024-02-02 08:25:15 +01:00
parent f828b170b9
commit 7ee12e90e4
2 changed files with 7 additions and 2 deletions
@@ -31,6 +31,11 @@ export const load = async ({ url, cookies }): Promise<LoadOutput> => {
const matches = url.host.match(/([a-z 0-9 -]+).*classroomio[.]com/);
const subdomain = matches?.[1] ?? '';
if (!url.host.includes('.classroomio.com')) {
// TODO: We can verify if custom domain here
return response;
}
if (!blockedSubdomain.includes(subdomain)) {
const answer = Array.isArray(matches) ? !!subdomain && subdomain !== 'www' : false;