File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1616import types
1717from os import environ
1818
19- from flask import Flask
20- from flask import request
21-
2219import user_profile_service
23- from optimizely import logger
24- from optimizely import optimizely
20+ from flask import Flask , request
21+ from flask_wtf .csrf import CSRFProtect
22+
23+ from optimizely import logger , optimizely
2524from optimizely .helpers import enums
2625
2726app = Flask (__name__ )
27+ # Initialize CSRF protection
28+ csrf = CSRFProtect (app )
2829
2930datafile = open ('datafile.json' , 'r' )
3031datafile_content = datafile .read ()
@@ -118,7 +119,7 @@ def before_request():
118119
119120@app .after_request
120121def after_request (response ):
121- global optimizely_instance
122+ global optimizely_instance # noqa: F824
122123 global listener_return_maps
123124
124125 optimizely_instance .notification_center .clear_all_notifications ()
Original file line number Diff line number Diff line change 1- Flask == 2.2.5
1+ Flask == 3.1.0
2+ flask-wtf == 1.2.2
You can’t perform that action at this time.
0 commit comments