We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 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.



7.1k

Can you give me an example ?

Thx,

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