add protected routes

This commit is contained in:
Vechtomov
2023-01-13 23:18:01 +03:00
parent d0ef7c4bbc
commit a9664172ac
+11 -1
View File
@@ -4,5 +4,15 @@ export { default } from "next-auth/middleware";
* Guards these pages and redirects them to the sign in page.
*/
export const config = {
matcher: ["/create/:path*", "/evaluate/:path*", "/label/:path*", "/account/:path*", "/dashboard", "/admin/:path*"],
matcher: [
"/create/:path*",
"/evaluate/:path*",
"/label/:path*",
"/account/:path*",
"/dashboard",
"/admin/:path*",
"/tasks/:path*",
"/leaderboard",
"/messages/:path*",
],
};