Legacy middleware functions.
1.0.1