fix: middleware config matcher (#20450)
* fix: middleware config matcher - ending slash * improve comment
This commit is contained in:
+12
-4
@@ -174,6 +174,8 @@ function responseWithHeaders({ url, res, req }: { url: URL; res: NextResponse; r
|
||||
export const config = {
|
||||
// Next.js Doesn't support spread operator in config matcher, so, we must list all paths explicitly here.
|
||||
// https://github.com/vercel/next.js/discussions/42458
|
||||
// WARNING: DO NOT ADD AN ENDING SLASH "/" TO THE PATHS BELOW
|
||||
// THIS WILL MAKE THEM NOT MATCH AND HENCE NOT HIT MIDDLEWARE
|
||||
matcher: [
|
||||
"/403",
|
||||
"/500",
|
||||
@@ -204,10 +206,16 @@ export const config = {
|
||||
"/booking/:path*",
|
||||
"/payment/:path*",
|
||||
"/routing-forms/:path*",
|
||||
"/team/:path*",
|
||||
"/org/:path*",
|
||||
"/:user/:type/",
|
||||
"/:user/",
|
||||
"/org/:orgSlug/instant-meeting/team/:slug/:type",
|
||||
"/org/:orgSlug/team/:slug/:type",
|
||||
"/org/:orgSlug/team/:slug",
|
||||
"/org/:orgSlug/:user/:type",
|
||||
"/org/:orgSlug/:user",
|
||||
"/org/:orgSlug",
|
||||
"/team/:slug/:type",
|
||||
"/team/:slug",
|
||||
"/:user/:type",
|
||||
"/:user",
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user