Skip to content

Commit 3e4217f

Browse files
committed
Fix redirect
1 parent 1bdd29a commit 3e4217f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
export default defineNuxtRouteMiddleware(() => {
2+
console.log('defineNuxtRouteMiddleware');
3+
24
if (import.meta.client) return
35

6+
console.log('import.meta.client', import.meta.client);
7+
8+
49
const host = useRequestHeaders(["host"])?.host
5-
if (host?.includes("mammoth.celenium.io")) {
10+
console.log('host', host);
11+
12+
if (host === "mammoth.celenium.io") {
613
return navigateTo("https://celenium.io/", { redirectCode: 301 })
714
}
815
})

0 commit comments

Comments
 (0)