Varnish Configuration

Hello,

Is there a special configuration to allow varnish to cache CakePHP 3 website?
I know that CakePHP adds CSRF field on forms so if a page cached then visitors will get mismatch CSRF token so how we can handle this.

Thanks

Hi, you need to setup your own vcl on varnish to get the result you want. To handle csrf field problem, you can use esi if your varnish version support or handle it with a ajax call to get the token, be carefull to set that url out of varnish caching process. I would be happy to help you, if you need help, I’m working on that plugin https://github.com/chepchepcirkus/VarnishBakery may be we can make it feet to your need.