f7f7u7f7
f7f7u7f7
CDCloudflare Developers
Created by f7f7u7f7 on 4/30/2024 in #next-on-pages
I've set up clerk (core v2) with next-on
I managed to get it running by reverting to the old middleware (which is deprecated)
import { authMiddleware } from "@clerk/nextjs/server";

const privateRoutes = [/\/start/];

export default authMiddleware({
publicRoutes: (req) => !privateRoutes.some((route) => route.test(req.url)),
});

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

const privateRoutes = [/\/start/];

export default authMiddleware({
publicRoutes: (req) => !privateRoutes.some((route) => route.test(req.url)),
});

export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
Some other day, I will give it a shot again!
1 replies