sandbox-web-ide/frontend/middleware.ts
2024-04-16 17:18:51 -04:00

11 lines
270 B
TypeScript

import { authMiddleware } from "@clerk/nextjs"
export default authMiddleware({
publicRoutes: (req) =>
!req.url.includes("/dashboard") && !req.url.includes("/code"),
})
export const config = {
matcher: ["/((?!.+\\.[\\w]+$|_next).*)", "/", "/(api|trpc)(.*)"],
}