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
I use echo v3, I repeat the request controller (refresh page), it will create a number of records in redis scs / session, this is a bug or I use the wrong method?
the code is probably this:
This is happening because the session cookie is never being written by the SCS middleware. I think the session cookie isn't being written because Echo's WrapMiddleware doesn't actually pass the underlying http.ResponseWriter onwards -- it replaces it entirely it's own c.Response() object instead and the session manager's Write method is therefore never called.
Unless Echo can be changed so that WrapMiddleware extends the underlying http.ResponseWriter instead of replacing it, the only 'fix' I can see is to call session.Save manually in your handlers which modify the session data, like so:
I use echo v3, I repeat the request controller (refresh page), it will create a number of records in redis scs / session, this is a bug or I use the wrong method?
the code is probably this:
main.go
Controller
Refresh three pages, redis appeared in three records, I think this is not normal?
The text was updated successfully, but these errors were encountered: