Releases: krakenjs/meddleware
v3.0.4
v3.0.2
Fixes
- Fix regression for the
enabledoption 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
routeoption 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
enabledtotrue. I.e., omitting theenabledoption will still enable the middleware.
Previously: middleware was defaultedenabledtofalse. -
The ability to toggle the
enabledstate of a middleware at arbitrary points during runtime has been removed. Now, a middleware that is notenabled—by explicitly settingenabledtofalse, given breaking change No.1—will not berequired (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.