Allow the use of a Proc to decide if the middleware is enabled
Merge pull request #1 from camilo/use_proc_for_enable

Allow the use of a Proc to decide if the middleware is enabled