Skip to content

Commit 141992e

Browse files
Potential fix for code scanning alert no. 3: Flask app is run in debug mode
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 053afc7 commit 141992e

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)