Middleware gets purged after API reload

Hi Rob,

You should be able to add Javascript Middleware using the same methods as you woudl have done in version 2.2. The main difference now is that changes made to any of a specific API’s attributes from within the Dashboard will no longer wipe existing Middleware settings on the API definition itself (which is what happened in previous releases of Tyk). I would advise that you use API requests like the ones you’ve used up until now to add Middleware settings however, the method outlined in the Tyk Pro documentation I linked to last week should also work.

With regards to your missing log statements, have you tried replacing log with console.log in your middleware settings? I suspect that there may be a typo in the docs.

Kind regards,
Jess @ Tyk