title: Express route bundling
body: <p>My routes.js file</p>
  
  <pre><code>module.exports = function(app) {
   //donesn't need to be authorized
   app.use('/login', require('./controllers/session'))
  
   //will need to be protected
   app.use('/user', auth, require('./controllers/users'))
   app.use('/vineyards', auth, require('./controllers/vineyard'))
   app.use('/varietals', require('./controllers/varietals'))
   app.use('/wines', auth, require('./controllers/wine'))
   app.use('/spectrums', auth, require('./controllers/spectrum'))
   app.use('/lockers', auth, require('./controllers/locker'))
   app.use('/logout', auth, require('./controllers/session')) 
  }
  </code></pre>
  
  <p>The 'auth' middleware works when I make a get, or jsonp request, but if I use post it errors out, with a statusCode of 0, and content 'XMLHttpRequestProgressEvent XMLHttpRequestProgressEvent'. However if I go in the actual controllers and put the auth middleware on the actual post like below, it works. </p>
  
  <pre><code>router.post('/', auth, function(req, res) {});
  </code></pre>
  
  <p>Why is that? Is there a better way to make the middleware run before all calls to a controller then putting it on each individual route? </p>