fix(cron): exempt /api/cron/* from Clerk auth.protect()

trim-feeds and anniversaries validate their own CRON_SECRET bearer
token, but Clerk's middleware ran auth.protect() first and 307-redirected
every request (including the cron caller) to sign-in before the route
handler's own check ever ran. Same pattern as /api/webhooks/(.*), which
also authenticates itself independently of Clerk.
This commit is contained in:
admin committed 2026-07-21 21:09:22 +02:00
1 parent 3db0692910
commit c744bee9dc
1 file changed
+1
+1
View File
@@ -14,6 +14,7 @@ const isPublicRoute = createRouteMatcher([
"/join(.*)",
"/api/webhooks/(.*)",
"/api/auth/(.*)",
"/api/cron/(.*)",
]);
export default clerkMiddleware(async (auth, request) => {