I’m using Connect.js and the connect-session module for managing session cookies. I noticed that Connect sets a session cookie on all routes except static files. The problem is that I process some static files like JS and CSS files before I send them so I can’t use Connect’s built-in static server, which means that connect-session sets a session cookie for these files. Since these files will be included on external sites, I don’t want them to send cookies with them.
Is it possible to set session cookies only for specific routes?
Alright I found my answer here: http://senchalabs.github.com/connect/middleware-session.html
You can ignore routes by using connect.session.ignore like so:
connect.session.ignore.push('/robots.txt');