Skip to content

Commit fd0930c

Browse files
pvcravenPaul V Craven
and
Paul V Craven
authored
Try 3 to fix csrf scan issue (#452)
Co-authored-by: Paul V Craven <[email protected]>
1 parent 5f71922 commit fd0930c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/testapp/application.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
from optimizely import logger, optimizely
2424
from optimizely.helpers import enums
2525

26+
# Create the flask app
2627
app = Flask(__name__)
27-
# Initialize CSRF protection
28+
29+
# Set up CSRF protection
30+
app.config["SECRET_KEY"] = environ.get("CSRF_SECRET_KEY", "default_csrf_secret_key")
2831
csrf = CSRFProtect(app)
2932

33+
# Read in the datafile
3034
datafile = open('datafile.json', 'r')
3135
datafile_content = datafile.read()
3236
datafile.close()

0 commit comments

Comments
 (0)