diff options
author | 2018-04-05 09:54:20 +0100 | |
---|---|---|
committer | 2018-04-05 09:54:20 +0100 | |
commit | e61f3943ee23a52f408661dcd6d161d7a555b94b (patch) | |
tree | 23687fd7b945d21577900e9ab82ba42c7a311ea2 /pysite/route_manager.py | |
parent | Attempt to fix CSRF; add debug info to staff page (diff) |
A few smaller fixes
Diffstat (limited to 'pysite/route_manager.py')
-rw-r--r-- | pysite/route_manager.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pysite/route_manager.py b/pysite/route_manager.py index b36ccadd..e6d2c92c 100644 --- a/pysite/route_manager.py +++ b/pysite/route_manager.py @@ -36,6 +36,11 @@ class RouteManager: self.app.config["PREFERRED_URL_SCHEME"] = PREFERRED_URL_SCHEME self.app.config["WTF_CSRF_CHECK_DEFAULT"] = False # We only want to protect specific routes + # We make the token valid for the lifetime of the session because of the wiki - you might spend some + # time editing an article, and it seems that session lifetime is a good analogue for how long you have + # to edit + self.app.config["WTF_CSRF_TIME_LIMIT"] = None + self.app.before_request(self.db.before_request) self.app.teardown_request(self.db.teardown_request) |