From ff3a39ab03c2a4091aa56da039775dde4541d9f0 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sun, 1 Apr 2018 23:16:55 +0100 Subject: Add CSRF protection and optimise imports --- pysite/constants.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pysite/constants.py') diff --git a/pysite/constants.py b/pysite/constants.py index 921a32b9..69633127 100644 --- a/pysite/constants.py +++ b/pysite/constants.py @@ -3,6 +3,8 @@ from enum import Enum, IntEnum from os import environ +from flask_wtf import CSRFProtect + class ErrorCodes(IntEnum): unknown_route = 0 @@ -68,3 +70,7 @@ PAPERTRAIL_PORT = int(environ.get("PAPERTRAIL_PORT") or 0) # DataDog logging DATADOG_ADDRESS = environ.get("DATADOG_ADDRESS") or None DATADOG_PORT = int(environ.get("DATADOG_PORT") or 0) + +# CSRF + +CSRF = CSRFProtect() -- cgit v1.2.3