fix: 容器内关闭 Flask debug

This commit is contained in:
deploy
2026-10-29 14:44:18 +08:00
parent d727e44572
commit 0a23742170
+1 -1
View File
@@ -369,7 +369,7 @@ if __name__ == '__main__':
else:
print(f"⚠️ 未检测到SSL证书,使用HTTP模式")
print(f"监听地址: http://0.0.0.0:{HTTP_PORT}")
app.run(host='0.0.0.0', port=HTTP_PORT, debug=True)
app.run(host='0.0.0.0', port=HTTP_PORT, debug=(os.environ.get('UPLOAD_DEBUG','0')=='1'))
except Exception as e:
print(f"❌ 服务器启动失败: {e}")
import traceback