Releases: krakenjs/meddleware
v3.0.4
v3.0.2
Fixes
- Fix regression for the
enabled
option inside any of the flow control registration types.
v3.0.1
Breaking Changes
-
registered middleware factories are now called with a context set to the method owner. This helps in specific cases (e.g., Passport).
Previously: The factory was called with a context ofnull
.
v2.1.0
New Features
-
Add support for the
route
option to take a regular express. Caveats: with *.json configs, you will still need to convert the string to a regular express with something like shortstop-regex. Additionally, any mountpath will need to be properly accounted for by your regular expression.
v2.0.0
Breaking Changes
-
Middleware now defaults
enabled
totrue
. I.e., omitting theenabled
option will still enable the middleware.
Previously: middleware was defaultedenabled
tofalse
. -
The ability to toggle the
enabled
state of a middleware at arbitrary points during runtime has been removed. Now, a middleware that is notenabled
—by explicitly settingenabled
tofalse
, given breaking change No.1—will not berequire
d (i.e., not parsed), and cannot be enabled at a later time.
Previously: middleware could be toggled. Was by design, but largely unused and caused unanticipated behavior.