How to render CSRF input in twig?

前端 未结 5 1666
野性不改
野性不改 2021-02-02 06:39

I know there\'s the usual way to render CSRF token hidden input with form_rest, but is there a way to render just CSRF input itself? I\'ve overridd

5条回答
  •  青春惊慌失措
    2021-02-02 07:08

    didn't find solution worked for me, finded and tested and worked for my Simfony3 value="{{ _token }}" in example

         

    more about scrf can be viewed here: Creating forms manually in Symfony2, but still use its CSRF and isValid() functionalily

提交回复
热议问题