From d502d3427a582e77735accc72b937c83d183aba9 Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Thu, 5 Dec 2024 18:30:32 -0800 Subject: [PATCH] Use custom domain for LP hostname --- apps/web/src/app/hostnames.ts | 2 +- apps/web/src/middleware.ts | 10 +++++----- apps/web/src/utils/replaceUrls.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/web/src/app/hostnames.ts b/apps/web/src/app/hostnames.ts index 133e76861..1ee4e0893 100644 --- a/apps/web/src/app/hostnames.ts +++ b/apps/web/src/app/hostnames.ts @@ -1,5 +1,5 @@ // We are in the process of migrating to the new landing page hosting. -export const landingPageWebflowHostname = 'e2b-dev.webflow.io' +export const landingPageHostname = 'e2b-landing-page.com' export const landingPageFramerHostname = 'e2b-landing-page.framer.website' export const blogFramerHostname = 'e2b-blog.framer.website' export const changelogFramerHostname = 'e2b-changelog.framer.website' diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts index 3abf3ef1c..778ba888d 100644 --- a/apps/web/src/middleware.ts +++ b/apps/web/src/middleware.ts @@ -1,7 +1,7 @@ import { NextRequest, NextResponse } from 'next/server' import { replaceUrls } from '@/utils/replaceUrls' import { - landingPageWebflowHostname, + landingPageHostname, landingPageFramerHostname, blogFramerHostname, changelogFramerHostname, @@ -17,22 +17,22 @@ export async function middleware(req: NextRequest): Promise { if (url.pathname === '' || url.pathname === '/') { if (process.env.NODE_ENV === 'production') { - url.hostname = landingPageWebflowHostname + url.hostname = landingPageHostname } else { return NextResponse.redirect(new URL('/dashboard', req.url)) } } if (url.pathname.startsWith('/terms')) { - url.hostname = landingPageWebflowHostname + url.hostname = landingPageHostname } if (url.pathname.startsWith('/privacy')) { - url.hostname = landingPageWebflowHostname + url.hostname = landingPageHostname } if (url.pathname.startsWith('/pricing')) { - url.hostname = landingPageWebflowHostname + url.hostname = landingPageHostname } // TODO: Not on the new landing page hosting yet diff --git a/apps/web/src/utils/replaceUrls.ts b/apps/web/src/utils/replaceUrls.ts index 4cb337b8a..0180f6650 100644 --- a/apps/web/src/utils/replaceUrls.ts +++ b/apps/web/src/utils/replaceUrls.ts @@ -1,5 +1,5 @@ import { - landingPageWebflowHostname, + landingPageHostname, landingPageFramerHostname, blogFramerHostname, changelogFramerHostname, @@ -13,7 +13,7 @@ export function replaceUrls(text: string, urlPathName: string, prefix: string = (_, url) => url + suffix, ) .replaceAll( - `${prefix}${landingPageWebflowHostname}`, + `${prefix}${landingPageHostname}`, `${prefix}https://e2b.dev` ) .replaceAll(