v0.53.0 — route config
The genuine gap from Fastify’s Routes page: per-route config / metadata.
.config({ scope: "admin", rateTier: "high" })on a route or group attaches arbitrary metadata, read in the handler or route middleware viarequest.route.config— for per-route flags (auth scope, rate tier, layout choice).- Group config merges into every route, with a route’s own keys winning.
- The matched-route context is now set before a route’s middleware, so route/group middleware can branch on
request.route.
On the other two references checked:
- Request — already comprehensive (method/path/url/headers/param/query/body/all/input/only/except/cookie/file(s)/accepts/ip(s)/subdomain/raw/route…).
request.routenow also carriesconfig. - Server — already covered by the
Applicationlifecycle (boot/onReady/onShutdown/terminate),HttpKernel, thekeel routescommand (printRoutes), andtestClient(inject).
345 tests; type-checked doc examples (which caught the RouteDefinition literal needing the new field). See docs/routing.md.