Tag Archives: Disable csrf protection

Disable csrf protection in Symfony

Disable LOCAL csrf protection

In order to disable CSRF for just *this* form, inside the form configure() method add following code

$this->disableLocalCSRFProtection();

Disable GLOBAL csrf protection

It might also happen that you want to quickly disable CSRF protection for all forms you have, you can do this using static method disableCSRFProtection() on sfForm.

sfForm::disableCSRFProtection()