We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

How to checkToken or CSRF by DELETE or PUT Method ?

I had a problem to check CSRF using PUT and DELETE Method. I have to change all to POST Method.

when we check phalcon security => https://github.com/phalcon/cphalcon/blob/master/phalcon/security.zep#L393

Token is check only in POST.

Is there a solution to use it with PUT and DELETE ?

Well, send post data with put/delete method. You can do it with them too.


Can you give me an example ?


Not for the same reasons, but I chose to generate CSRF token with my custom way.