Skip to content

Scheduling infrastructure for absolutely everyone.

chore: clean up config.matcher in middleware (#18638)

Benny Joo07085b9ffb48
diff --git a/apps/web/app/not-found.tsx b/apps/web/app/not-found.tsx
index a03b61b3403..95a9a8c97ec 100644
--- a/apps/web/app/not-found.tsx
+++ b/apps/web/app/not-found.tsx
@@ -2,7 +2,6 @@ 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,
@@ -53,9 +52,10 @@ async function NotFound() {
const host = headersList.get("x-forwarded-host") ?? "";
const pathname = headersList.get("x-pathname") ?? "";
- if (!pathname) {
- redirect("/500");
- }
+ // This makes more sense after full migration to App Router
+ // if (!pathname) {
+ // redirect("/500");
+ // }
const { username, pageType, url } = getPageInfo(pathname, host);
const isBookingSuccessPage = pathname?.startsWith("/booking");
diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts
index d1d6c3b3fe3..44d95ab66bd 100644
--- a/apps/web/middleware.ts
+++ b/apps/web/middleware.ts
@@ -171,15 +171,11 @@ export const config = {
"/api/auth/signup",
"/api/trpc/:path*",
"/login",
- "/auth/:path*",
+ "/auth/login",
"/apps/:path*",
- "/event-types/:path*",
- "/workflows/:path*",
"/getting-started/:path*",
"/workflows/:path*",
- "/getting-started/:path*",
"/event-types/:path*",
- "/apps/:path*",
"/routing/:path*",
"/bookings/:path*",
"/video/:path*",
@@ -189,13 +185,7 @@ export const config = {
"/reschedule/:path*",
"/availability/:path*",
"/booking/:path*",
- "/payment/:path*",
- "/router/:path*",
"/routing-forms/:path*",
- "/org/:path*",
- "/team/:path*",
- "/:user/:type/",
- "/:user/",
],
};
diff --git a/apps/web/pages/_error.tsx b/apps/web/pages/_error.tsx
index 76089811d60..50dce26a411 100644
--- a/apps/web/pages/_error.tsx
+++ b/apps/web/pages/_error.tsx
@@ -85,8 +85,6 @@ CustomError.getInitialProps = async (ctx: AugmentedNextPageContext) => {
log.debug(`server side logged this: ${err?.toString() ?? JSON.stringify(err)}`);
log.info("return props, ", errorInitialProps);
- res.setHeader("x-pages-router-error", "true");
-
return errorInitialProps;
} else {
// Running on the client (browser).