Flask: How To Prevent Replay Attacks
问题 I'm trying to implement a logic in my Flask application to prevent reply attacks. Regarding to the question asked here, My idea is to set the current session lifetime when user logs out from the system. In general, it is suggested to set the session lifetime this way: @app.before_request def before_request(): session.permanent = True app.permanent_session_lifetime = timedelta(minutes=10) However, I want to set my current session life time when user logs out from the system. Something like the