Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to update cookie Expiry for GUEST_LANGUAGE_ID and COOKIE_SUPPORT co
Hi,
As part of our new cookie policy implementation, we should follow FRENCH LAW and not to store cookies more than 6 months.
I could implement this for Google nalytics and other custom cookies
But when coming to liferay generated cookies GUEST_LANGUAGE_ID and COOKIE_SUPPORT these are set to 1 year and not able to update them.
Kindly let me know if there is any way to update.
I already tried below properties, but i donw see that met my requirement
cookie.http.only.names.excludes=
company.security.auto.login.max.age=15552000
Thank you,
Bhargavi
These two cookies are marked HttpOnly
I also tried to Update using document.cookie JS but, it is creating new cookie, Instead of updating original
Based on the only place where I found the Language Cookie to be set, and the painfully hardcoded definition of MAX_AGE, your best bet is if you can introduce a filter that intercepts the cookie being set, and changes its max age. Or override LanguageImpl, but that sounds less tempting than the filter.
On a positive note: Both cookies are not suspect for any profiling/tracing and absolutely non-personalized. But I don't know the details about the french law and what exactly it demands.