This commit is contained in:
Oleg Maslov
2026-09-02 10:14:22 +02:00
parent 0c3e2ead3b
commit b20b138fe4
771 changed files with 161561 additions and 9027 deletions

25
apps/www/proxy.ts Normal file
View File

@@ -0,0 +1,25 @@
// Next.js 16 convention: proxy.ts replaces the deprecated middleware.ts name.
import { clerkMiddleware } from '@clerk/nextjs/server';
/**
* Clerk auth proxy.
*
* Default behavior: all routes are PUBLIC. Per-route protection is enforced
* with `await auth.protect()` inside Server Components / Route Handlers.
* Sign-up gating for Pro/Teams checkout is handled at CTA level via
* <SignUpButton mode="modal"> (see §5.4).
*/
export default clerkMiddleware();
export const config = {
matcher: [
// Keep public acquisition, legal, documentation, and download pages
// independent of Clerk session refreshes. Auth is required only where the
// route reads identity or owns an authenticated flow.
'/account(.*)',
'/sign-in(.*)',
'/sign-up(.*)',
'/(api|trpc)(.*)',
],
};