Referencing middlewares inside plugins

This is a great question, one that I’ve actually hit myself while working on prototypes.

From what I understand it’s not natively allowed to modify that specific array in that same structure from within the plugin but you can use the unshift and push methods.

For example I was writing an example plugin to kinda handle audit-logging and you can see here where I was pushing that plugin to the beginning of the array: