diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 3c37e24..d55303e 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,7 +1,12 @@ import type { Handle } from '@sveltejs/kit'; import * as auth from '$lib/server/auth'; +import { redirect } from '@sveltejs/kit'; const handleAuth: Handle = async ({ event, resolve }) => { + if (event.url.hostname === 'bibdle.orthodox.cafe') { + throw redirect(301, `https://bibdle.com${event.url.pathname}${event.url.search}${event.url.hash}`); + } + const sessionToken = event.cookies.get(auth.sessionCookieName); if (!sessionToken) {