From cc3203a1fc17046ce051834be45e4f1e2df0fff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Sun, 14 Jun 2026 07:29:53 +0400 Subject: [PATCH] =?UTF-8?q?feat(test):=20action=20'debug'=20=E2=80=94=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D0=B0=D1=82=D1=8C=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BE=D0=BA?= =?UTF-8?q?=D1=80=D1=83=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20(=D0=BC=D0=B0?= =?UTF-8?q?=D1=81=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=BD=D0=BE)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit POST /test {"action":"debug"} → LLM_API_KEY, DB_*, etc. --- site/test_routes.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/site/test_routes.py b/site/test_routes.py index 97a2d56..4e006b3 100644 --- a/site/test_routes.py +++ b/site/test_routes.py @@ -111,4 +111,15 @@ def test(): return jsonify(result), 500 return jsonify(result) + if action == "debug": + # Показать переменные окружения (с маскировкой ключей) + import os as _os + vars_info = {} + for k, v in sorted(_os.environ.items()): + if any(x in k.upper() for x in ("KEY", "PASS", "SECRET", "TOKEN")): + vars_info[k] = v[:6] + "..." if v else "(empty)" + elif any(x in k.upper() for x in ("DB_", "LLM_", "FLASK", "PORT")): + vars_info[k] = v + return jsonify({"env": vars_info, "python": _os.sys.version}) + return jsonify({"error": f"unknown action: {action}"}), 400