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

x-clockwork cookie lingers with incorrect values after disabling toolbar and client metrics #657

Open
ssnepenthe opened this issue Oct 26, 2023 · 1 comment

Comments

@ssnepenthe
Copy link
Contributor

Tested with laravel.

Steps to reproduce:

  1. Make sure clockwork-browser scripts are loaded and the toolbar is enabled - refresh the site so cookie is sent
  2. Disable both toolbar and client metrics collection and refresh the site site again
  3. The x-clockwork cookie is still present with toolbar set to true, so the toolbar will be visible even though disabled

Not sure what would be the preferred approach here:

  1. Ignore it - cookie has a 60 second expiration so the toolbar should disappear shortly.
  2. Drop the conditional here so that cookie is updated on every request. This would ensure that the toolbar and metrics portion of the cookie are updated to false
  3. Unset the x-clockwork cookie if present but toolbar and client metrics are currently disabled
@itsgoingd
Copy link
Owner

Hey, sorry, I somehow completely missed this issue. I guess we should be able to tell if the cookie is still present when the toolbar is disabled and remove it just in that case. That would be the cleanest solution. I'll take a look at this soon.

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

No branches or pull requests

2 participants