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).
opengym.duarte-santos.ch
Source of the project website — plain hand-written HTML/CSS/JS, no build step, served by nginx.
Not in this folder (added at deploy time):
img/— the five screenshots from../assets/screenshots/plusbanner.pngicon-180.png/icon-512.png— copied from../frontend/public/(the same icons the PWA uses, so the browser tab, home screen and app all match)openGym.apk— the signed release build (see../docs/MOBILE.md)demo/— the browser-only demo build of the app, embedded in the#demosection and reachable on its own at/demo/. Built from../frontendwithVITE_DEMO=1and the jsDelivr media bases (see the recipe in../.github/workflows/pages.yml), so the ~140 MB of exercise media stays out of it. It has to live on this host: the site frames it, andX-Frame-Options: SAMEORIGINwould block it from anywhere else.
site.js fetches the star/issue counts and the release timeline from the public
gitea.com API at view time. It pointed at api.github.com until that account was
suspended; the two URLs go back once it is restored, together with the notice
block at the top of index.html and the demo iframe.