Hi all!
I was wondering what the best plugin choice was for the following use case.
We are proxying a number of API’s, each we different middleware requirements. All of them will need a custom authentication middleware which will be the same across all API’s but others will also need more API specific middlewares.
We would ideally like to build up a set of default middlewares that we can mix and match and add more bespoke ones were needed depending on the API requirements.
We do not want to write a custom middleware per API if we can help it as if we change something within the authentication flow, we would need to update and deploy each bundle again and update each API to use the new bundle.
Is it possible to use multiple custom middlewares within a single API and simply chain them? After looking at the rich plugin docs it looks like you can only supply a single “custom middleware bundle” per API.
Is this correct? If so, does anyone have any suggestions on how we keep our middleware set up as DRY as possible? Or maybe there is another solution such as JS middlewares?
Thanks in advance!
Tom