Invalid cookie validity period set by flask session

here"s my configuration for session
-sharpsession config
SECRET_KEY = os.urandom (24)
SESSION_COOKIE_NAME = "rai_session"
SESSION_KEY_PREFIX =" rai_"
SESSION_PERMANENT = True
PERMANENT_SESSION_LIFETIME = timedelta (days=1)
REMEMBER_COOKIE_DURATION = timedelta (days=1) < / days=1 >

the generated session is shown in the following figure:

clipboard.png

Please help us to see what is wrong with the configuration

Oct.28,2021
The

problem is solved. After reading the source code, the app.config configuration is limited. Many related configurations need to be configured in the session instance, and the parameter PERMANENT, validity period needs to be set to take effect. While PERMANENT needs to configure session.permanent = True in the session instance, app.config does not have any related configuration. PERMANENT_SESSION_LIFETIME needs to verify that session.permanent is Ture before it takes effect.

Menu