add Auth for subdomain page like vercel.pub
Unanswered
Palomino posted this in #help-forum
PalominoOP
I am trying to make something like https://vercel.pub and I have to add Clerk Authentication in the middleware.
I have added the Clerk's
import { authMiddleware } from "@clerk/nextjs";
export default authMiddleware({
publicRoutes: [
"/api/webhooks(.*)",
"/api/trigger",
"/api/status",
"/api/uploadthing",
"/api/status"
],
});
export const config = {
matcher: [
"/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)",
"/((?!api/|_next/|_static/|_vercel|[\\w-]+\\.\\w+).*)",
],
};I have added the Clerk's
authMiddleware function but I don't know where to add the subdomain redirect middleware.