.

Coffee Powered

code and content

Monthly Archives: January 2011

Rails, Varnish, Cookie Sessions, and CSRF tokens

I’ve recently been trying to figure out how to get Rails to place nicely with Varnish. It doesn’t do that very well. In a nutshell: Varnish is easy to use, if your app isn’t setting session cookies until you actually need them. The presence of a session cookie usually means that content shouldn’t be cacheable. [...]