sandbox-web-ide/frontend/middleware.ts

11 lines
270 B
TypeScript
Raw Permalink Normal View History

2024-04-09 01:20:15 -04:00
import { authMiddleware } from "@clerk/nextjs"
export default authMiddleware({
2024-04-11 05:14:10 -04:00
publicRoutes: (req) =>
!req.url.includes("/dashboard") && !req.url.includes("/code"),
2024-04-09 01:20:15 -04:00
})
export const config = {
2024-04-11 03:34:58 -04:00
matcher: ["/((?!.+\\.[\\w]+$|_next).*)", "/", "/(api|trpc)(.*)"],
2024-04-09 01:20:15 -04:00
}