File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 77import os
88
99app .config ['SECRET_KEY' ] = os .getenv ('SECRET_KEY' )
10+ app .config ['SESSION_COOKIE_HTTPONLY' ] = True
11+ app .config ['SESSION_COOKIE_SECURE' ] = bool (os .getenv ('SESSION_COOKIE_SECURE' ))
12+
1013csrf = CSRFProtect (app )
1114
1215@app .route ('/' , methods = ['GET' , 'POST' ])
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ services:
1111 environment :
1212 FLASK_APP : app.py
1313 SECRET_KEY : supersecret
14+ SESSION_COOKIE_SECURE : 0
1415 OPENAI_API_KEY : ${OPENAI_API_KEY} # Set your OpenAI API key here or in the .env file
1516 command : flask run --host=0.0.0.0
1617 deploy :
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ services:
1414 environment :
1515 FLASK_APP : app.py
1616 SECRET_KEY :
17+ SESSION_COOKIE_SECURE : 1
1718 OPENAI_API_KEY : ${OPENAI_API_KEY} # Set your OpenAI API key here or in the .env file
1819 command : uwsgi --http 0.0.0.0:5000 --wsgi-file app.py --callable app --processes 4 --threads 2
1920 deploy :
You can’t perform that action at this time.
0 commit comments