Skip to content

v9.4.0

Latest

Choose a tag to compare

@github-actions github-actions released this 26 Nov 10:41
· 1 commit to main since this release
300c04d

What's Changed

Behavior changes

  • use() now accepts several middleware, and arrays of them, with or without a path. use('/admin', audit, auth) used to silently drop auth: it now runs.
  • use() now throws FST_ERR_MIDDIE_INVALID_MIDDLEWARE (a TypeError) at registration when a middleware is not a function or none is given, instead of failing every matching request with a 500.
  • As in Express, an array passed as the first argument is a list of middleware rather than of paths when its first entry is a function.

Full Changelog: v9.3.10...v9.4.0