From 69c6749e71f9b1150adaf9ff938e456275a0f05f Mon Sep 17 00:00:00 2001 From: Damillora Date: Mon, 25 Jul 2022 19:50:11 +0700 Subject: [PATCH] feat: goodbye amp --- src/routes/[tag]/[slug]/amp.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/routes/[tag]/[slug]/amp.ts diff --git a/src/routes/[tag]/[slug]/amp.ts b/src/routes/[tag]/[slug]/amp.ts new file mode 100644 index 0000000..0637269 --- /dev/null +++ b/src/routes/[tag]/[slug]/amp.ts @@ -0,0 +1,11 @@ +import type { RequestHandler } from "@sveltejs/kit"; + +export const GET: RequestHandler = async ({ params }) => { + return { + status: 301, + headers: { + "Location": `/${params.tag}/${params.slug}` + }, + }; +}; +