I'm currently working on a web page where I need to utilize Clerk for authentication and login. However, I've encountered an issue with the middleware taking too long to load, causing deployment problems for the app.
Here is the code from middleware.ts:
import { authMiddleware } from "@clerk/nextjs";
export default authMiddleware({
publicRoutes: ['/', '/api/webhook/clerk', "/api/uploadthing"],
ignoredRoutes: ['/api/webhook/clerk']
});
export const config = {
matcher: ["/((?!.*\\..*|_next).*)", "/", "/(api|trpc)(.*)"],
};
I'm seeking assistance in resolving this issue. Any help would be greatly appreciated!