-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Cannot include two cookies with the same name in a response #3002
Comments
I'm curious why do you need diffrent cookies for domain and subdomain? |
My use case is that we originally set the cookie on the subdomain, but now we need to implement our SSO feature on a different subdomain. The solution is easy: just set the cookie on My use case is pretty unusual, but I suspect that this will apply to paths as well (not that you should be using cookies with the same names in that situation, either). I think that I've found a workaround which is to do this: response.headers['Set-Cookie'] = 'foo=""; Domain=sub.domain.com; HttpOnly; Max-Age=-1; Path=/' |
It turns out that even if this worked as I expected, IE and Edge don't really care about the cookie domain when it comes to having multiple I'm going to close this issue. |
Agree. And workaround exists, a direct setting of response headers in complex cases sounds very reasonable to me. |
I've encountered this problem too. |
You always can analyze |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Long story short
This is similar to #1125 except that this relates to the server rather than the client.
The server cannot send back two cookies for different subdomains that have the same name.
Expected behaviour
If multiple cookies are defined with the same name but different paths/domains, both cookies should be sent on the response.
Actual behaviour
The response only includes the last cookie set
Steps to reproduce
response.cookies
will only contain the second cookieYour environment
The text was updated successfully, but these errors were encountered: