Home / Companies / Supabase / Blog / Post Details
Content Deep Dive

Supabase Middleware: composable, reusable middleware for Web Fetch handlers

Blog post from Supabase

Post Details
Company
Date Published
Author
-
Word Count
2,162
Company Posts That Month
12
Language
English
Hacker News Points
-
Post removed?
No
Summary

Supabase announced @supabase/middleware at Supabase Select on October 2, a free MIT-licensed TypeScript library for composing type-safe per-request middleware across Web Fetch-compatible runtimes and frameworks including Hono, H3, Elysia, NestJS, and TanStack Start. It builds on @supabase/server by allowing concerns such as CORS, JWT verification, feature flags, Supabase clients, Postgres connections, and OAuth protected-resource handling to be arranged in an ordered pipeline, where entries can add typed context, stop requests with responses, or modify outgoing responses. Pipelines can run unchanged on environments such as Supabase Edge Functions, Vercel Functions, Cloudflare Workers, Deno, Bun, and modern Node.js, although individual middleware may have runtime limitations such as Postgres TCP support. Framework bridges let developers reuse Fetch-standard middleware within framework-specific middleware systems through small project-local adapter files. The package also provides defineMiddleware for creating reusable custom entries with TypeScript checks for dependency order and duplicate context keys, while middleware can be published as versioned packages for use across projects.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
MCP 11 5,797 566 174 -45%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.