chore: clean up config.matcher in middleware (#18638)
Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
1 parent
14151b827f
commit
07085b9ffb
3 files changed
+5
-17
No files matched your search
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user