diff --git a/src/routes/(app)/documents/[id]/pages/[page]/+page.ts b/src/routes/(app)/documents/[id]/pages/[page]/+page.ts new file mode 100644 index 00000000..3174414f --- /dev/null +++ b/src/routes/(app)/documents/[id]/pages/[page]/+page.ts @@ -0,0 +1,13 @@ +import { redirect } from "@sveltejs/kit"; + +import { EMBED_URL } from "@/config/config.js"; + +// redirect to embed route +export function load({ url }) { + const u = new URL(url); + + u.searchParams.set("embed", "1"); + u.hostname = EMBED_URL; + + return redirect(302, u); +}