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

Invalid cookie header warnings #19

Open
RickMoynihan opened this issue Sep 7, 2020 · 2 comments
Open

Invalid cookie header warnings #19

RickMoynihan opened this issue Sep 7, 2020 · 2 comments

Comments

@RickMoynihan
Copy link
Member

We've all seen these annoying warnings for a long time. I've stumbled across a fix so recording the issue here so I can record a fix against it:

[WARN ] 2020-09-07 14:14:39.540 [nREPL-session-9ee343f0-4be9-455d-8a24-c263cdf781ef] ResponseProcessCookies - Invalid cookie header: "Set-Cookie: did=s%3Av0%3A15b9a150-f10c-11ea-a8cf-13f852d23ac2.LT1AtjEjsFfXQAuT0RHJxXHgL0iV3Ozzzg08z9kbVR8; Max-Age=31557600; Path=/; Expires=Tue, 07 Sep 2021 19:14:39 GMT; HttpOnly; Secure; SameSite=None". Invalid 'expires' attribute: Tue, 07 Sep 2021 19:14:39 GMT
@scottlowe
Copy link
Contributor

scottlowe commented Nov 14, 2022

@RickMoynihan A clue! 🕵🏼

I think there might be an issue with the cookie Max-Age=31557600 - probably copied from the token_lifetime value in this auth0 docs example:

https://auth0.com/docs/secure/tokens/refresh-tokens/configure-refresh-token-rotation

I believe that the Max-Age value can be no higher than 31536000 for a year in seconds (ignoring leap years etc.).

The expires part of the error could be misleading because it is likely calculated from the Max-Age. Could it be that? 🤔

https://ashton.codes/set-cache-control-max-age-1-year/

I just found a related issue in muttnik, where we were setting this value too high.

@scottlowe
Copy link
Contributor

Relates to muttnik issue https://github.com/Swirrl/muttnik/issues/315

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