Skip to content

Commit 656f986

Browse files
authored
Merge pull request #254 from ProgrammingLab/alert-autofix-3
Potential fix for code scanning alert no. 3: Flask app is run in debug mode
2 parents 053afc7 + 141992e commit 656f986

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/src/wsgi.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from app import app
2+
import os
23

34
if __name__ == "__main__":
4-
app.run(host='0.0.0.0', port=5000, debug=True)
5+
debug_mode = os.getenv('FLASK_DEBUG', 'False').lower() in ['true', '1', 't']
6+
app.run(host='0.0.0.0', port=5000, debug=debug_mode)

0 commit comments

Comments
 (0)