Skip to content
Off-topic for aiqbench

Off-topic for aiqbench

This story was gathered from a source we follow but falls outside AI and quantum coverage, so there is no aiqbench take for it.

Supabase Middleware: composable, reusable middleware for Web Fetch handlers

Supabase8 min read

Type-safe, composable middleware for Web Fetch handlers. Write it once, use it on any fetch runtime or inside a framework.

On October 2 at Supabase Select we shipped @supabase/middleware, composable, type-safe middleware for Web Fetch handlers. You can now write per-request logic once and run it on any runtime that supports fetch. The same middleware also works inside frameworks like Hono, H3, Elysia, NestJS, and TanStack Start. To use it in a framework, you copy a short bridge file into your project. @supabase/middleware is free, MIT-licensed, and built for TypeScript developers who write fetch handlers. @supabase/server has covered the setup step since May: one wrapper gives your handler a client scoped to the caller, an admin client, and verified identity and claims. But your handler still carries its own per-request logic on top: checking a flag, handling CORS, deciding what a request needs before your code runs. That logic stays stuck in the handler where you wrote it. Move to another runtime, and you write it again. Adopt a framework, and you rewrite it as that framework's middleware, and it stays there. Start a…

Excerpt shown under the publisher's RSS terms · 164 words · full text and figures are on the publisher's site

Related coverage