I’m currently developping an application in Symfony using Guzzle. I succesfully created a service where I make my requests (one request to get a list of enterprises, another to get user infos, …) but I have issues regarding cookies in Guzzle. I’ve got to say I’m a newbie regarding API so I’m learning as I ..
I have a symfony 3.4 app that works perfectly in production. I try to install it in dev mode (in local) for that I use docker on a virtual machine (ubuntu). The app works (I can access the frontend anywhere I don’t need to be loggued) but when I try to send a form I ..
i’m looking for the way to handle cookies in Symfony 5 … and there is nothing really usefull online. To set a news cookie, i do : use SymfonyComponentHttpFoundationCookie; //….. $cookie = new Cookie(’email’, $data[’email’] ,time() + (365 * 24 * 60 * 60)); $response->headers->setCookie($cookie); $response->sendHeaders(); And it works (don’t hesitate to tell me if ..
first time using docker and nginx reverse proxy. Setup Dockerized front with Vuejs behind localhost:4200 Dockerized back with Symfony behind a dockerized nginx on localhost:80 Trouble Every time I add a cookie to the response, the Set-Cookie get ignored by the front. Telling me: This Set-Cookie was blocked because its Domain attribute was invalid with ..
I made two tests with exactly the same code except the returned status code of my request (200 for one test, and 201 for another test). Here the only difference between my two tests: return new JsonResponse(["id" => $transaction->getId()], Response::HTTP_OK); and return new JsonResponse(["id" => $transaction->getId()], Response::HTTP_CREATED); In the first case, no Set-Cookie header is ..
I have 4 framework files: /config/framework.yaml: framework: csrf_protection: true session: # enables the support of sessions in the app enabled: true # ID of the service used for session storage. # NULL means that Symfony uses PHP default session mechanism handler_id: Symfo/blnyComponentHttpFoundationSessionStorageHandlerRedisSessionHandler # improves the security of the cookies used for sessions cookie_secure: true cookie_lifetime: ..
I have a REST API made in symfony on the domain example1.com and a client in Angular running on example2.com. My REST API also has some views on the same domain (example1.com). If I add a cookie from the domain example1.com Could I then delete it from example2.com (Angular App) using an AJAX request? Source: ..
I have configured symfony 4 to set a remember me cookie when the users checks a checkbox. This works as it should. But when I restart the Browser and return to the Website the website deletes the cookie. The symfony log looks like this: [Application] Oct 21 14:14:12 |DEBUG | SECURI Remember-me cookie detected. [Application] ..
When my users log in, a session is created. While browsing, they are forced to be redirected several times to https://login.microsoftonline.com When the session is stored in a flat file, no problem, the session is found, the user is logged in. When I store the session in the database, the user is recognized and the ..
I’m trying to set a cookie in Symfony 4.4 and php 7.2. I don’t find any combination for secure and SameSite that works and doesn’t throw a browser error: The "last_client_edited" cookie will soon be rejected because its "SameSite" attribute is set to "None" or an invalid value and it does not have the "secure" ..