Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user to save the tracking information server side instead of in a cookie #89

Merged
merged 1 commit into from
May 14, 2024

Conversation

loevgaard
Copy link
Member

No description provided.

@loevgaard loevgaard force-pushed the client-metadata-storage branch 5 times, most recently from 2b2afa5 to f8f2db5 Compare May 7, 2024 13:22
@loevgaard loevgaard force-pushed the client-metadata-storage branch from f8f2db5 to 689c83e Compare May 7, 2024 13:23
}

try {
$cookie = $this->trackingInformation->toCookie($this->cookieName, 1);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeg antager at vi vil fjerne cookien, men det er måske ikke direkte muligt? Og at vi i stedet sætter den til at expire om 1 sekund?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja, det er sådan, Symfony gør det: https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php#L222. Grunden til, at jeg ikke bruger deres metode til det er at der (vist nok) er nogle gange en cookie ikke bliver slettet, hvis man ikke angiver de samme parametre for cookien, som den blev sat med.

Copy link

@leflings leflings left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser fint ud 👍

@loevgaard loevgaard merged commit 5397a28 into 2.x May 14, 2024
18 of 19 checks passed
@loevgaard loevgaard deleted the client-metadata-storage branch May 14, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants