You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, in using starsessions for a project, I've run into an issue - while running everything on localhost, the library behaves perfectly. However, as soon as I put it in a docker container, behind a reverse proxy, or even try to deploy it, calling request.session.clear() seems to not set cookie_domain for the cookie that's being deleted. So, in effect, the old cookie remains unchanged, while the session is deleted in the backend, and a new cookie for localhost is set with the right expiry and session id and everything.
So, in using starsessions for a project, I've run into an issue - while running everything on localhost, the library behaves perfectly. However, as soon as I put it in a docker container, behind a reverse proxy, or even try to deploy it, calling
request.session.clear()
seems to not setcookie_domain
for the cookie that's being deleted. So, in effect, the old cookie remains unchanged, while the session is deleted in the backend, and a new cookie forlocalhost
is set with the right expiry and session id and everything.The issue happens here:
starsessions/starsessions/middleware.py
Lines 96 to 102 in b002235
I might be misunderstanding something, however, but if this is an actual issue, I'll attach a PR suggestion to fix it.
The text was updated successfully, but these errors were encountered: