File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
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 CSRFProtect , Flask , request
21+
22+ from optimizely import logger , optimizely
2523from optimizely .helpers import enums
2624
2725app = Flask (__name__ )
26+ # Initialize CSRF protection
27+ csrf = CSRFProtect (app )
2828
2929datafile = open ('datafile.json' , 'r' )
3030datafile_content = datafile .read ()
@@ -118,7 +118,7 @@ def before_request():
118118
119119@app .after_request
120120def after_request (response ):
121- global optimizely_instance
121+ global optimizely_instance # noqa: F824
122122 global listener_return_maps
123123
124124 optimizely_instance .notification_center .clear_all_notifications ()
You can’t perform that action at this time.
0 commit comments