I am creating a mobile application that talks to my symfony2 application through webservices I cannot find a way to disable csrf protection on a specific controller / action
I want to send registration data to this action and use sf2 form validation. I do not name the form in my mobile application
It is not possible to change the parameters of the container in action, throw an exception, because it is a frozen parameter ...
I do not want to disable form protection for my entire application
any clue?
thank!
update: with symfony 2.1.x
public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'csrf_protection' => false, )); }
ajax symfony csrf
Julien Rollin Mar 27 '12 at 10:09 2012-03-27 10:09
source share