fix(connect): middleware for prod