This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git
The following commit(s) were added to refs/heads/main by this push:
new c0bb000 Add an admin route to display all server config values
c0bb000 is described below
commit c0bb0008ffecaf40df37d1ece45b269890e0d1cc
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Jun 26 20:27:29 2025 +0100
Add an admin route to display all server config values
---
atr/blueprints/admin/admin.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/atr/blueprints/admin/admin.py b/atr/blueprints/admin/admin.py
index c4ee69f..1990a0a 100644
--- a/atr/blueprints/admin/admin.py
+++ b/atr/blueprints/admin/admin.py
@@ -39,6 +39,7 @@ import werkzeug.wrappers.response as response
import wtforms
import atr.blueprints.admin as admin
+import atr.config as config
import atr.datasources.apache as apache
import atr.db as db
import atr.db.interaction as interaction
@@ -151,6 +152,29 @@ async def admin_browse_as() -> str | response.Response:
return quart.redirect(util.as_url(root.index))
[email protected]("/config")
+async def admin_config() -> quart.wrappers.response.Response:
+ """Display the current application configuration values."""
+
+ conf = config.get()
+ values: list[str] = []
+ for name in dir(conf):
+ if name.startswith("_"):
+ continue
+ try:
+ val = getattr(conf, name)
+ except Exception as exc:
+ val = f"<error: {exc}>"
+ if name.endswith("_PASSWORD"):
+ val = "<redacted>"
+ if callable(val):
+ continue
+ values.append(f"{name}={val}")
+
+ values.sort()
+ return quart.Response("\n".join(values), mimetype="text/plain")
+
+
@admin.BLUEPRINT.route("/consistency")
async def admin_consistency() -> quart.Response:
"""Check for consistency between the database and the filesystem."""
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]