Update middleware.js.coffee