v1.8.29: admin pages — allow about+index in backend, fix broken main tags in privacy/terms

This commit is contained in:
2026-05-28 22:24:51 +00:00
parent 4dfd5918dc
commit c4c82d0d80
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -149,7 +149,7 @@ def library_ui(): return FileResponse("/opt/rag/static/library.html")
@app.get("/admin/pages/{page_name}")
def get_page_content(page_name: str, _=Depends(require_admin)):
allowed = {"privacy", "terms"}
allowed = {"privacy", "terms", "about", "index"}
if page_name not in allowed:
raise HTTPException(404, "Page not found")
path = f"/opt/rag/static/{page_name}.html"
@@ -160,7 +160,7 @@ def get_page_content(page_name: str, _=Depends(require_admin)):
@app.post("/admin/pages/{page_name}")
def save_page_content(page_name: str, payload: dict, _=Depends(require_admin)):
allowed = {"privacy", "terms"}
allowed = {"privacy", "terms", "about", "index"}
if page_name not in allowed:
raise HTTPException(404, "Page not found")
content = payload.get("content", "")
+1 -1
View File
@@ -340,7 +340,7 @@ main {
<div id="universal-header"></div>
<main class="max-w-3xl" mx-auto px-4 lg:px-8 py-10">
<main class="max-w-3xl mx-auto px-4 lg:px-8 py-10">
<div class="glass rounded-2xl p-8" style="border:1px solid rgba(78,222,163,0.12)">
<div class="flex items-center gap-3 mb-8 pb-6 border-b border-white/5">
<div class="w-10 h-10 bg-primary/15 rounded-xl flex items-center justify-center shrink-0">
+1 -1
View File
@@ -340,7 +340,7 @@ main {
<div id="universal-header"></div>
<main class="max-w-3xl" mx-auto px-4 lg:px-8 py-10">
<main class="max-w-3xl mx-auto px-4 lg:px-8 py-10">
<div class="glass rounded-2xl p-8" style="border:1px solid rgba(78,222,163,0.12)">
<div class="flex items-center gap-3 mb-8 pb-6 border-b border-white/5">
<div class="w-10 h-10 bg-primary/15 rounded-xl flex items-center justify-center shrink-0">