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 we wrote cstore.Options.Maxage = 2654000 in the project. but keep getting 500 error because of the cookie is expired. (btw return 500 on cookie expiry is too much?). then we found the session store's MaxAge is the value we set but the MaxAge in securecookie still using the initial value(12 hours). Eventually, we found the Maxage setter function in the source code. Apparently, to set MaxAge, we should use cstore.Options.Maxage(265400) rather than assigning the value directly.
It took us several hours to dig it out. I think it would be good to add the correct usage in the sample.
The text was updated successfully, but these errors were encountered:
Hopefully the change I made is sufficient. It's worth noting that you may want to be calling MaxAge on the cookiestore itself in your code, otherwise something may be missed (looking at the source code for the method).
Propose adding
cstore.Options.MaxAge(xxx)
to the sample.In the sample, it says
So we wrote
cstore.Options.Maxage = 2654000
in the project. but keep getting 500 error because of the cookie is expired. (btw return 500 on cookie expiry is too much?). then we found the session store's MaxAge is the value we set but the MaxAge in securecookie still using the initial value(12 hours). Eventually, we found the Maxage setter function in the source code. Apparently, to set MaxAge, we should usecstore.Options.Maxage(265400)
rather than assigning the value directly.It took us several hours to dig it out. I think it would be good to add the correct usage in the sample.
The text was updated successfully, but these errors were encountered: