sandbox-web-ide/middleware.ts
2024-04-11 05:14:10 -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)(.*)"],
}