Skip to content

Commit

Permalink
refactor(website): ♻️ update main domain
Browse files Browse the repository at this point in the history
  • Loading branch information
diecodev committed Nov 23, 2024
1 parent 0da4500 commit f477273
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/adapters/deno/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default extendConfig(baseConfig, () => {
denoServerAdapter({
ssg: {
include: ["/*"],
origin: "https://qwik-date.deno.dev",
origin: "https://qwik-date.dieco.dev",
},
}),
],
Expand Down
10 changes: 7 additions & 3 deletions website/src/routes/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ import { routeLoader$ } from '@builder.io/qwik-city'
import type { RequestHandler } from '@builder.io/qwik-city'
import { Toaster } from 'qwik-sonner'

export const onGet: RequestHandler = async ({ cacheControl, redirect, url }) => {
const {host} = url;
export const onGet: RequestHandler = async ({
cacheControl,
redirect,
url,
}) => {
const { host } = url
// redirect to custom domain
if (host === 'qwik-date.deno.dev') {
throw redirect(301, "https://qwik-date.dieco.dev");
throw redirect(301, 'https://qwik-date.dieco.dev')
}

// Control caching for this request for best performance and to reduce hosting costs:
Expand Down

0 comments on commit f477273

Please sign in to comment.