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
@@ -9,6 +9,11 @@ Not in this folder (added at deploy time):
|
||||
- `icon-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 `#demo` section and
|
||||
reachable on its own at `/demo/`. Built from `../frontend` with `VITE_DEMO=1` and 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, and
|
||||
`X-Frame-Options: SAMEORIGIN` would 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
|
||||
|
||||
+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">
|
||||
|
||||
+5
-5
@@ -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">
|
||||
@@ -93,8 +93,8 @@
|
||||
your device with a free Apple ID (Apple expires the signature after 7 days; re-run
|
||||
from Xcode to renew). See
|
||||
<a href="https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/MOBILE.md" rel="noopener">docs/MOBILE.md</a>.</li>
|
||||
<li><b>Just looking?</b> The in-browser demo was hosted on GitHub Pages and is offline
|
||||
while my GitHub account is suspended — the Android app above needs no account either.</li>
|
||||
<li><b>Just looking?</b> Try the <a href="/demo/">in-browser demo</a> — the real app with
|
||||
example data, no account and nothing to install. The Android app above needs no account either.</li>
|
||||
</ul>
|
||||
|
||||
<h2 id="selfhost">Self-host with Docker</h2>
|
||||
|
||||
+10
-14
@@ -51,9 +51,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">
|
||||
@@ -135,18 +135,14 @@
|
||||
|
||||
<section id="demo"><div class="wrap">
|
||||
<p class="kicker">Live demo</p>
|
||||
<h2>Temporarily offline</h2>
|
||||
<p class="lead">The in-browser demo ran on GitHub Pages, which went down with my suspended
|
||||
GitHub account. It comes straight back once the account is restored.</p>
|
||||
<div class="offline">
|
||||
<span class="big">🚧</span>
|
||||
<p><b>Want to try openGym in the meantime?</b> Install the Android app below — it needs no
|
||||
account and no server — or run the self-hosted version with one <code>docker compose up</code>.</p>
|
||||
<div class="hero-btns" style="margin-top:18px">
|
||||
<a class="btn" href="#download">Get openGym</a>
|
||||
<a class="btn ghost" href="https://gitea.com/DuarteSantos/openGym" rel="noopener">Browse the code on Gitea</a>
|
||||
</div>
|
||||
<h2>Try it right here</h2>
|
||||
<p class="lead">This is the real app with seeded example data, running in your browser —
|
||||
poke around, start a workout, change anything.</p>
|
||||
<div class="demo-wrap">
|
||||
<div class="phone"><iframe src="/demo/" title="openGym live demo" loading="lazy"></iframe></div>
|
||||
</div>
|
||||
<p class="demo-note">Demo data lives only in this browser tab-family and can be reset in its
|
||||
Settings. Prefer a full window? <a href="/demo/">Open the demo full-screen →</a></p>
|
||||
</div></section>
|
||||
|
||||
<section id="download"><div class="wrap">
|
||||
|
||||
Reference in new issue
Block a user