All tags / #middleware

#middleware

4 posts

Request IDs, /up, and Logs a Machine Can Read: Observability in Wheels 4

Peter Amiri

Three small pieces of plumbing turn 'the site gave me an error around lunchtime' into a single grep: the RequestId middleware, the /up health endpoint your app already ships, and a forty-line JSON logging pattern. Plus the two health-endpoint mistakes everyone makes once.

CORS in Wheels 4: Deny by Default, Open It Correctly

Peter Amiri

Wheels 4 denies cross-origin requests until you say otherwise — and the Cors middleware refuses the popular ways of saying it wrong. The deny-all breaking change, single-origin resolution, Vary: Origin, preflight handling, and the legacy-settings trap the framework defuses for you.

Writing Your Own Middleware in Wheels 4.0

Peter Amiri

A from-scratch guide to authoring custom middleware in Wheels 4.0 — the one-method interface, the singleton-per-app lifecycle and the thread-safety it demands, how to short-circuit, and how to register globally or per route.

Skip the Plugin: Building a Rate-Limited API in Wheels 4.0

Peter Amiri

Wheels 4.0 ships a real middleware pipeline, and three of the things you used to reach for a plugin to add — rate limiting, CORS, and security headers — are built in. This post walks through wiring a JSON API with per-API-key rate limits, sane proxy handling, and the right ordering so you do not accidentally weaken the very headers you were trying to add.

Newsletter

Release notes and new posts, once a month. No spam.

Prefer RSS? Subscribe to the feed →