croxton / Stash

Stash allows you to stash text and snippets of code for reuse throughout your templates.
GNU General Public License v3.0
197 stars 20 forks source link

Cookie compliance policies #164

Closed Havsvik closed 5 years ago

Havsvik commented 5 years ago

Hi,

I found this in our developer logs:

A cookie (stashid) is being sent without being properly registered, and does not meet cookie compliance policies. Register this cookie appropriately in your addon.setup.php file.

Is there any possible fix for this in development?

//Oskar

croxton commented 5 years ago

The Stash cookie is needed for user-scoped variables (variables specific to the user) and cache pruning. You don't need to use the former, and the later can (and should ideally) be implemented with a cron job.

To disable the Stash cookie, set stash_cookie_enabled to false in your config: https://github.com/croxton/Stash/wiki/Installing-and-upgrading

If you disable the cookie and are using cached variables that expire after a certain period, you must setup a cron for cache pruning: https://github.com/croxton/Stash/wiki/Cache-pruning-configuration#pruning-using-a-cron-job

If you DO need to use the cookie, it should be listed as a necessary / essential session cookie in your Cookies policy page (to comply with GDPR). Set the cookie name in the stash config (stash_cookie) and add the name you chose to array in the addon.setup.php file for Stash:

'cookies.necessary' => [
  'the-cookie-name',
],
Havsvik commented 5 years ago

Alright, that sounds great :)

Thanks for the quick reply!