diff --git a/src/middleware.test.ts b/src/middleware.test.ts index 1195f07..3c51d64 100644 --- a/src/middleware.test.ts +++ b/src/middleware.test.ts @@ -51,6 +51,7 @@ const PROTECTED = [ "/rewards", "/credentials", "/credentials/cred-123", + "/settings", "/courses/course-1", "/courses/course-1/modules/module-2", "/courses/course-1/quiz", @@ -144,6 +145,7 @@ describe("matcher", () => { "/dashboard/:path*", "/rewards/:path*", "/credentials/:path*", + "/settings/:path*", "/courses/:courseId/:path*", "/connect", "/onboarding", diff --git a/src/middleware.ts b/src/middleware.ts index 084db2b..fc6bad5 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -10,6 +10,7 @@ const PROTECTED_PREFIXES = [ "/dashboard", "/rewards", "/credentials", + "/settings", "/courses/", // individual course pages, modules, quiz — NOT /courses list ]; @@ -71,6 +72,7 @@ export const config = { "/dashboard/:path*", "/rewards/:path*", "/credentials/:path*", + "/settings/:path*", "/courses/:courseId/:path*", // individual course + sub-pages only "/connect", "/onboarding",