forked from replearn/BitBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmiddleware.ts
More file actions
12 lines (10 loc) · 793 Bytes
/
middleware.ts
File metadata and controls
12 lines (10 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
import { authMiddleware } from "@clerk/nextjs";
// This example protects all routes including api/trpc routes
// Please edit this to allow other routes to be public as needed.
// See https://clerk.com/docs/nextjs/middleware for more information about configuring your middleware
export default authMiddleware({
publicRoutes : ["/", "/demo", "/sign-up", "/profile", "/api/User", "/api/teacher", "/api/User/projects/(.*)","/api/teacher/student","/api/teacher/student/(.*)","/api/teacher/(.*)", "/api/sockets/init","/api/sockets/members"]
});
export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)/(.*)", "/api/User", "/api/User/projects/(.*)","/api/teacher/student", "/api/teacher/student/(.*)", "/api/teacher/(.*)", "/api/sockets/init", "/api/sockets/members"],
};