Skip to content

Commit

Permalink
set timeout to 12 hours (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronhelton authored Jan 27, 2023
1 parent 7de1d27 commit 4b566e0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dlx_rest/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
from dlx_rest.utils import is_safe_url

# This function sets an expiration/timeout for idle sessions.
# We can configure this to anything we like, but 15 minutes is
# typical, and mentioned under OICT security controls.
# If we implement this, we should alert the user with enough
# time to respond accordingly.
@app.before_request
def make_sesion_permanent():
session.permanent = True
app.permanent_session_lifetime = timedelta(minutes=15)
app.permanent_session_lifetime = timedelta(hours=12)

# Special case for testing, so we can test this without waiting too long
if Config.TESTING:
Expand Down

0 comments on commit 4b566e0

Please sign in to comment.