title: Express: is it possible to bypass sessions for static files?
body: <p>I'm using a quite straightforward setup of Express + Mongoose + Passport + Connect-mongo, and everything works fine. The only thing that is puzzling me, is that I can see the <code>passport.unserializeUser</code> called even for static files, which is - from my application point of view - absolutely pointless.</p>
  
  <p>I can understand that there are cases where you want the static files to be served under some sort of authorization as well, but I wonder how I could "skip" the whole session middleware in case I'm serving a static file.</p>
  
  <p>(In a production environment I could not use cookies for assets)</p>