I'm using react-cookies and I'd like to let a cookie expire at the end of the day (not after 24hrs or at the end of a session BUT at the end of the day).
Here's how I set the cookie:
setCookies("dailyCookie", {
path: "/",
maxAge: // should expire at the end of the day,
sameSite: true,
});
I haven't found the right solution, yet (similar questions: set cookie to expire at the end of current day). Any help is appreciated! Thanks!