API: Fix the blueprint API
(cherry picked from commit 5bdfcad6)
The previous code was using kind of private attr access to add a before_request
the the blueprint.
This MR use the public API for interoperability. Which allow to use before_request
at other places.