Loading…
Topic
Fetch
1 post about Fetch. Every summary links to the original.
- 1 post
- 1 company
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Supabase Middleware: composable, reusable middleware for Web Fetch handlers
Supabase released @supabase/middleware, a composable, type-safe library for Web Fetch handlers on October 2 at Supabase Select. It abstracts per-request logic like CORS handling, JWT verification, and feature flags into reusable entries that work across any fetch runtime and frameworks including Hono, H3, Elysia, NestJS, and TanStack Start. The pipeline function chains entries in order; each entry adds a typed key to a shared ctx object and can return a Response to short-circuit the chain, such as a 401 on invalid JWT. Built-in middleware includes withCors, withRequiredClaims, withSupabaseClient (scoped to the caller via RLS), and withPostgresAdminClient, and the pipeline produces a standard fetch handler portable to Node 22+, Deno, Bun, Cloudflare Workers, or frameworks via bridge files. Developers write custom middleware using defineMiddleware with compile-time type guarding for key conflicts and dependency order, and can share them as npm packages.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.