Level 1
Did you find a solution to that?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I followed the setup process for Laravel Sanctum and when I run
axios.get('/sanctum/csrf-cookie)
I get a valid 204 response but no CSRF cookie in the response, only the session cookie.
cURL Request:
curl --location --request GET 'localhost:8000/sanctum/csrf-cookie' \
--header 'Access-Control-Allow-Credentials: true'
cURL Response:
Host:
localhost:8000
Date:
Thu, 09 Jul 2020 13:02:25 GMT
Date:
Thu, 09 Jul 2020 13:02:25 GMT
Connection:
close
X-Powered-By:
PHP/7.4.7
Cache-Control:
no-cache, private
Access-Control-Allow-Origin:
Vary:
Origin
Access-Control-Allow-Credentials:
true
Set-Cookie:
app_session=eyJpdiI6ImoyR2lZVkdqWjJ4Zm9HSC9QYSt2cWc9PSIsInZhbHVlIjoidmJOYkFmeitVNTJ2RytwY0VXM1dvZG5EaFdXSGF4ZSthWVBPYW41R3RhWlhGV1l3dXRpck0rWnFTNWtOQXFMViIsIm1hYyI6ImU1OGU5NGQ0N2FhZDBiYTg1ZDc0MDc3MzIwNGUzYTE4NTE2YTUxOTA0ODY4NmFjNmU1MjkxYTdiNjA4YjE2YjIifQ%3D%3D; expires=Thu, 09-Jul-2020 15:02:25 GMT; Max-Age=7200; path=/; domain=localhost; httponly; samesite=lax
Please or to participate in this conversation.