Supabase ships MIT-licensed Middleware: write fetch logic once, run on any runtime
dshukertjr · x · 2026-10-17
Supabase released @supabase/middleware at its October 2 Select stream: a free, MIT-licensed, composable, type-safe middleware library for Web Fetch handlers.
- Problem solved: per-request logic (auth checks, CORS, pre-request decisions) used to be stuck inside handlers or framework-specific middleware, forcing rewrites on every runtime/framework switch and multiplying chances for security mistakes.
- How it works: a pipeline composes logic pieces — including the @supabase/server setup for caller-scoped clients, admin client, and verified identity — and runs them on any fetch-capable runtime.
- Framework support: the same middleware works inside Hono, H3, Elysia, NestJS, and TanStack Start via a short bridge file you copy into the project.
- Compatibility: works with Bun, Cloudflare Workers and other major runtimes; standalone, usable without Supabase.
More from coding & agent
- Garry Tan shows agents coding his new project and handling DevOps in one go — garrytan · 2026-10-17
- Rod Johnson demos Embabel Worlds: vibe coding safely over knowledge graphs — springrod · 2026-10-17
- React core team member open-sources pstack, a skills stack for trustworthy AI coding agents — alexcovo_eth · 2026-10-17
- Handing a project to a new Claude? Make it take a 13-part onboarding course — ivan_bezdomny · 2026-10-17
- Musician makes hand-drawn 2D music video entirely in code with Claude and Remotion — pizzaisprettyneato · 2026-10-17
- How Codex Happened: Dan Shipper's 8,000-word AI-assisted feature for Every — lmoroney · 2026-10-17