I want to get CSRF token from cookie that laravel set with XSRF-Token key. (as described here)
but I think this cookie contains something else as its length is quite larger then a normal Laravel CSRF Token.
Also, I think there is some problem with my laravel App. because it sends two set-cookie headers in response.
Here is what laravel sends in set-cookie response headers.
Set-Cookie: dsss=eyJpdiI6InFQQjdtUDN0TG1NZTNqZjZaY3MwMXc9PSIsInZhbHVlIjoiR2hzaVwvUTJlQ28yTTVqVFJUeG5QcDBINnRcLzB6VEZpXC9MSGRnQktaRHNCY0U4SFwvQ01DZ0hJYVZrcjFMT21jaE5obkpMTUVTM1Eyc0pPRzhTdkJcL2ZYUT09IiwibWFjIjoiZDI5ZGQxMjYyZjZmN2MyMjk5YzFmNmVjNDRhNjkwY2VhNGRjZjBhN2E0NWM1MTFmYjVhMjA2Y2YzYmU3ZjFiMCJ9; expires=Mon, 18-Jun-2018 08:51:39 GMT; Max-Age=7200; path=/; HttpOnly
Set-Cookie: XSRF-TOKEN=eyJpdiI6Im4ra21yZlFGRWZjZ2YrQjE5WVdUMXc9PSIsInZhbHVlIjoiRlQ0ZHFaVk9idEY2K3hEV3hxSExsZjNKZ080cjhiTFEwdGZFK3RaOGgxOSs3dHNLRmRhcThZVFwvZ3J2ZFpxdG1VYjY2UjBobzEraTNZRm1Ha1ZUeGtRPT0iLCJtYWMiOiI5YzAzNWFhMjE0ZjBiYTM4MzE2OTFkNDYyYmZlYTc4NzdjNjc1YmMxODZkYzliZTkzZDI0MjQ3NzY4YjhhMmNlIn0%3D; expires=Mon, 18-Jun-2018 08:51:39 GMT; Max-Age=7200; path=/
Also, I renamed laravel_session cookie to dsss.
I can not use meta tags to store cookies because all my html is being cached. But I can send fresh response headers.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JUhM3k
via IFTTT
Aucun commentaire:
Enregistrer un commentaire