Expose the a hook in middleware