Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mr_shadow's avatar

Does csrf token provide security against curl

I am trying to develop a single-page application using Laravel and Vue js. I have some APIs that Vue js uses. In order to provide security to APIs I have added the CSRF middleware and the meta tag element which will be used by axios. I wanted to know if the APIs can be accessed using curl if a csrf token is passed as a request header or not? Moreover what extra steps can be taken to secure the APIs so that only my website has access to it.

0 likes
1 reply

Please or to participate in this conversation.