diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx index 46251b9984..a03b61b340 100644 --- a/apps/web/app/not-found.tsx +++ b/apps/web/app/not-found.tsx @@ -2,6 +2,7 @@ import { _generateMetadata, getTranslate } from "app/_utils"; import { WithLayout } from "app/layoutHOC"; import { headers } from "next/headers"; import Link from "next/link"; +import { redirect } from "next/navigation"; import { getOrgDomainConfigFromHostname, @@ -52,6 +53,10 @@ async function NotFound() { const host = headersList.get("x-forwarded-host") ?? ""; const pathname = headersList.get("x-pathname") ?? ""; + if (!pathname) { + redirect("/500"); + } + const { username, pageType, url } = getPageInfo(pathname, host); const isBookingSuccessPage = pathname?.startsWith("/booking"); const isSubpage = pathname?.includes("/", 2) || isBookingSuccessPage; diff --git a/apps/web/components/error/error-page.tsx b/apps/web/components/error/error-page.tsx index 0990a2aac4..b70086ca85 100644 --- a/apps/web/components/error/error-page.tsx +++ b/apps/web/components/error/error-page.tsx @@ -61,7 +61,7 @@ export const ErrorPage: React.FC = (props) => {

{statusCode}

It's not you, it's us.

- Something went wrong on our end. Get in touch with our support team, and we’ll get it fixed right + Something went wrong on our end. Get in touch with our support team, and we'll get it fixed right away for you.

diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts index cd9843a5d1..2cde8766fd 100644 --- a/apps/web/middleware.ts +++ b/apps/web/middleware.ts @@ -177,17 +177,15 @@ export const config = { "/event-types/:path*", "/workflows/:path*", "/getting-started/:path*", - "/auth/login", - "/future/auth/login", "/workflows/:path*", "/getting-started/:path*", "/event-types/:path*", "/apps/:path*", "/routing/:path*", - "/bookings/:status/", + "/bookings/:path*", "/video/:path*", - "/teams", - "/signup", + "/teams/:path*", + "/signup/:path*", "/settings/:path*", "/reschedule/:path*", "/availability/:path*",