Added common middleware to exports.