miggg
miggg
TTCTheo's Typesafe Cult
Created by Meyer on 5/14/2023 in #questions
Clerk middleware + trpc
this feels wrong. but trpc works now.
7 replies
TTCTheo's Typesafe Cult
Created by Meyer on 5/14/2023 in #questions
Clerk middleware + trpc
import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({
publicRoutes: ["/", "/(api|trpc)(.*)"],
});

export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
import { authMiddleware } from "@clerk/nextjs";

export default authMiddleware({
publicRoutes: ["/", "/(api|trpc)(.*)"],
});

export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
7 replies
TTCTheo's Typesafe Cult
Created by Meyer on 5/14/2023 in #questions
Clerk middleware + trpc
i also dont understand. i just want authmiddleware to ignore the "/" and the "/(api|trpc)(.*)", like in config. so i did this in middleware.ts:
7 replies