I am using Connect.js and the connect-session module to manage 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, such as JS and CSS files, before sending them, so I cannot use the built-in static Connect server, which means that the connection session sets a session cookie for these files. Since these cookies will be included on external sites, I do not want them to send cookies with them.
Is it possible to set session cookies only for certain routes?
source
share