Astro Middleware and API Endpoints in Practice
Combine Astro middleware with server endpoints to build request pipelines: auth gates, rate limiting, CORS handling, and JSON APIs that share context through Astro.locals.
11 posts · page 1 of 1
Combine Astro middleware with server endpoints to build request pipelines: auth gates, rate limiting, CORS handling, and JSON APIs that share context through Astro.locals.
Build custom Django middleware — request/response processing, exception handling, middleware ordering, and real-world examples.
Build custom FastAPI middleware for request logging, CORS handling, authentication checks, and performance monitoring.
Implement authentication middleware in Next.js to protect routes, redirect unauthenticated users, and manage JWT or session-based auth at the edge.
Practical middleware patterns for Next.js including authentication, A/B testing, geolocation routing, bot detection, and request logging.
Build composable HTTP middleware in Go for logging, auth, rate limiting, and recovery using standard library patterns.
Everything you need to know about Next.js middleware: how it works, matchers, redirects, rewrites, authentication checks, geolocation, rate limiting, and common patterns for production apps.
Use Astro middleware to run code on every request: auth gates, locals injection, redirects, and response headers. Learn the onRequest signature, the next() flow, sequencing, and common production patterns.
Understand how a Django request flows through middleware, URL routing, and views, and learn to write custom middleware for cross-cutting concerns.
Learn how FastAPI middleware works under the hood and write your own for logging, timing, and request enrichment.
What Next.js middleware actually is, how it runs on the Edge, what you can and cannot do there, and the patterns that work in production.