How can I create a generic middleware function, that is not attached to a specific router?

Original message was deleted