Release v1.2.9: Aktivitaetslog im Admin-Dashboard, Demo wieder online
Wer sich anmeldet, wer es vergeblich versucht und was ein Admin aendert, stand bisher nirgends — der Server hat schlicht nichts protokolliert. Aktivitaetslog: - ./data/audit.log, eine JSON-Zeile pro Event, angehaengt statt neu geschrieben. Bewusst NICHT in db.json: die Datei wird bei jedem Save komplett neu geschrieben, und der Login-Handshake ist unauthentifiziert — ein Log darin haette aus einem Muell-Request einen vollen Rewrite gemacht. - Aufbewahrung ist eine Obergrenze, kein Archiv: AUDIT_MAX (5000) bzw. AUDIT_DAYS (90). - Per Default an (AUDIT_LOG=0 schaltet es ganz ab). IP-Adressen per Default AUS; AUDIT_IP=net speichert nur das Netz, full die ganze Adresse. Nie der User-Agent, nie die Passkey-ID eines Fehlversuchs, nie ein abgelehnter Invite-Code. - Adresse kommt aus CF-Connecting-IP, dann X-Forwarded-For, dann X-Real-IP — ein Cloudflare-Tunnel schreibt den Besucher NICHT in XFF, dort steht sonst nur der Tunnel selbst und sieht dabei voellig plausibel aus. - Loeschen wird selbst protokolliert, die Event-IDs zaehlen weiter: die Luecke bleibt sichtbar. - Neue Karte in views/Admin.jsx (Filter, "Show more"), Aufbereitung in lib/audit.js mit 20 Tests. GET /api/admin/audit und POST /api/admin/audit/clear, beide hinter requireAdmin. Demo: - Die Live-Demo laeuft wieder, jetzt auf der Projektseite selbst statt auf GitHub Pages: opengym.duarte-santos.ch/demo/. Das eingebettete Telefon auf der Startseite geht damit auch wieder — es muss derselbe Host sein, X-Frame-Options ist SAMEORIGIN. Doku: README-Config-Tabelle, .env.example, SELF_HOSTING, SECURITY (inkl. der api/server.js-Zeilenverweise, die wieder stimmen).
This commit is contained in:
1 parent
e709f152c8
commit
8b99a644ed
17 files changed
+658
-67
No files matched your search
+3
-3
@@ -37,9 +37,9 @@
|
||||
<div class="alert" role="alert"><div class="wrap">
|
||||
<div class="alert-tag">⚠️ Important notice</div>
|
||||
<h2>My GitHub account has been suspended — the openGym repo is gone with it</h2>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository, the releases and the
|
||||
GitHub-Pages demo are all unreachable — not by choice. openGym itself is unaffected:
|
||||
the app, the APK on this page and every self-hosted install keep working exactly as before.</p>
|
||||
<p><b>github.com/DuarteSantos8/openGym is offline.</b> The repository and the releases are
|
||||
unreachable — not by choice. openGym itself is unaffected: the app, the APK on this page,
|
||||
the demo (now hosted here) and every self-hosted install keep working exactly as before.</p>
|
||||
<p>Until I get the account back, the code lives here — and the Discord is where I will announce
|
||||
the moment it is resolved:</p>
|
||||
<div class="alert-actions">
|
||||
|
||||
Reference in new issue
Block a user