fix: use module.exports.regexp in middleware