Question: How can I turn of CSRF protection globally on Symfony 3 with FOSUserBundle

Question

How can I turn of CSRF protection globally on Symfony 3 with FOSUserBundle

Answers 1
Added at 2017-09-07 21:09
Tags
Question

I am having a sessions issue that results "Failed to start the session: already started by PHP.". As a temporary workaround, I wan't to disable CSRF protection globally, including FOSUserBundle. How can I do this?

Answers to

How can I turn of CSRF protection globally on Symfony 3 with FOSUserBundle

nr: #1 dodano: 2017-09-07 21:09

try this available at doc :

framework:
    csrf_protection:
        enabled:   false

and if you need to disable it also in login form you just go to your security.yml file and remove the csrf_provider from the form_login directive, don't need to update the action class or anything.

Source Show
◀ Wstecz