Elliott-Chong / chatpdf-yt

https://chatpdf-elliott.vercel.app
694 stars 284 forks source link

414: URI_TOO_LONG Code: URL_TOO_LONG ID: ... #50

Open mxndeveloper opened 4 months ago

mxndeveloper commented 4 months ago

Hi! I got this error message after deploying to vercel "414: URI_TOO_LONG Code: URL_TOO_LONG ID", everything seemed to be working until this point. Any ideas? I would appreciate your help.

Additionally I go this log from the vercel timeline "[GET] [middleware: "src/middleware"] /sign-in reason=URL_TOO_LONG, status=414, user_error=true"

This is how my "middleware.ts" implementation looks like ... import { clerkMiddleware, createRouteMatcher } from "@clerk/nextjs/server";

const isPublicRoute = createRouteMatcher(["/", "/api/webhook"]);

export default clerkMiddleware((auth, request) => { if(!isPublicRoute(request)) { auth().protect(); } });

export const config = { matcher: ["/((?!.+.[w]+$|_next).)", "/", "/(api|trpc)(.)"], };

I am using according to my "package.json" this version for clerk

"@clerk/nextjs": "^5.0.12",

kunal-kumar-chaudhary commented 3 months ago

here is the fault: const isPublicRoute = createRouteMatcher(["/", "/api/webhook"]);

you should make sign-in and sign-up pages public too..

for example:-

const isPublicRoute = createRouteMatcher(['/','/sign-in(.*)', '/sign-up(.*)']);