Skip to content

Commit 4afdcc0

Browse files
committed
chore(website): 🚚 redirect to custom domain
1 parent 2bd5024 commit 4afdcc0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎website/src/routes/layout.tsx‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ import type { RequestHandler } from "@builder.io/qwik-city";
44

55
import styles from "./styles.css?inline";
66

7-
export const onGet: RequestHandler = async ({ cacheControl }) => {
7+
export const onGet: RequestHandler = async ({
8+
cacheControl,
9+
url,
10+
redirect,
11+
}) => {
12+
const { host } = url;
13+
14+
if (host === "qwik-sonner.deno.dev" || host === "localhost:5173") {
15+
throw redirect(301, "https://qwik-sonner.dieco.dev");
16+
}
17+
818
cacheControl({
919
staleWhileRevalidate: 60 * 60 * 24 * 7,
1020
maxAge: 5,

0 commit comments

Comments
 (0)