sessions icon indicating copy to clipboard operation
sessions copied to clipboard

Setting MaxAge: 0 will cause the expires_at field stored in the store to be the current time, causing the session to expire.

Open GavinTan opened this issue 1 month ago • 0 comments

I need to set the browser cookie expiration based on the session. Session.Options(sessions.Options{MaxAge:0}) can be implemented, but it directly causes the stored session to expire and the client cannot request normally. I have tried setting store.Options(sessions.Options{MaxAge:60}) If the session.Options(sessions.Options{MaxAge:0}) is set later, it will be directly overwritten.

GavinTan avatar May 17 '24 09:05 GavinTan