CSRF token and caching

Pinakee BIswas pinakee at waltzz.com
Wed May 25 11:02:23 CEST 2016


Hi,

Our backend uses CSRF tokens for form posts. For pages with forms, if 
Varnish caching is enabled for such pages, form post is failing due to 
CSRF error. Is there a way to handle this? I have been reading that 
using ESI is a solution.

Would really appreciate if someone could help with the above.

Thanks,

Pinakee

PS: Currently, we are using template caching by Nginx. The pages with 
form posts surprisingly works fine with Nginx template caching (but 
isn't working with Varnish). Trying to investigate why.




More information about the varnish-misc mailing list