R
R
ravshan selimov2021-05-29 15:48:54
Laravel
ravshan selimov, 2021-05-29 15:48:54

How to set http-only cookies to false in laravel?

Hello.
It is required to disable http-only for cookies.
I send cookies like this

$response->withCookie('user', $user, 60 * 24 * 14, '/', '', false, false); // 14 daysб, path, domains, secure, http-only


SetCookie header
Set-Cookie: user=%7B%22id%22%3A1%2C%22login%22%3A%22root%22%2C%22email%22%3Anull%2C%22fullname%22%3A%22root%22%2C%22role_id%22%3A1%2C%22role%22%3A%22root%22%2C%22permissions%22%3A%5B1000%2C1100%5D%7D; expires=Sat, 12-Jun-2021 12:43:53 GMT; Max-Age=1209600; path=/; samesite=lax


Now http-only does not come, but still I can’t get this cookie on the front, it doesn’t exist

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question