This is required for consumers that intend to use WithCustomMiddleware instead of WithMiddleware, as otherwise they are forced to re-implement this code
This is required for consumers that intend to use WithCustomMiddleware instead of WithMiddleware, as otherwise they are forced to re-implement this code