nuxt-multi-cache icon indicating copy to clipboard operation
nuxt-multi-cache copied to clipboard

Exclude cookies from route caching headers

Open unluckynelson opened this issue 2 years ago • 2 comments

Caching the cookies with a request is very problematic, as tracking cookies are then cached and breaks tracking. Any user selection around privacy cookie or settings is overwritten.

Please can we exclude caching Cookie headers

unluckynelson avatar Oct 24 '23 06:10 unluckynelson

I agree, also in my case I can't use this package because it saved cookies with authentication token.

brandon-gs avatar Jan 16 '24 17:01 brandon-gs

I've now implemented a way to alter which headers should be stored in cache, using the new route.alterCachedHeaders option. That way it's possible to completely remove the Set-Cookie header (or any other header) or do more granular adjustments (e.g. only remove certain cookies).

dulnan avatar Apr 07 '24 12:04 dulnan