Category: cookies

Can not set cookie in symfony app. How to fix it?

It can’t set cookie on my PC. I am working with my brother and it works for him on his PC if (isset($_POST[“stay_logged”])) { setcookie(“user_code”, $user->getCode(), null, “/”); $this->session->set(“user_code”, $user->getCode()); } isset($_POST[“stay_logged”]) return true, “stay_logged” is name of checkbox. sign_in.html.twig…

How to set and send Cookies in Symfony while the front-end is in ReactJS?

I am programming an application that uses ReactJs for the front-end in localhost:3001 and Symfony for the back-end localhost:3000, and to enable cross origin communication I use “cors-bundle” in Symfony. Now I want to create a Cookie when a user…