CustomProtectedRouteMatcher = (req:NextRequest) =>Promise<boolean> |boolean
Function used to dynamically determine whether a request should be treated as a protected route.
| Parameter | Type | Description |
|---|---|---|
req | NextRequest | The incoming Next.js request. |
Promise<boolean> | boolean
Return true to require authentication for the request, or false to allow it to continue without protection.