Statt direkter pipe dump→gzip→ssh wird der Dump jetzt in BACKUP_LOCAL_DIR (default /tmp/logbuch-backup) geschrieben und danach per scp übertragen. So ist der Dump jederzeit im Container einsehbar; SSH bleibt optional. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Neue Features (Statistik Grafik Proxy)
-
Proxy für das interne Statistik-Portal:
- Neuer Server-seitiger Proxy unter
/api/statistik/grafik(und Catch-all/api/statistik/grafik/*). - Holt die Statistik-Seite serverseitig mit Basic-Auth und gibt sie an den Browser weiter, damit Zugangsdaten nicht im Client landen.
- Leitet auch CSS/JS/Images und AJAX-POSTs durch den Proxy (weitergeleitete Methoden und Bodies werden erhalten).
- Die HTML-Antwort wird bereinigt und relative URLs so umgeschrieben, dass Assets über die Proxy-URL geladen werden (
<base href="/api/statistik/grafik/">).
- Neuer Server-seitiger Proxy unter
-
Environment-Variablen (server-side only):
STATISTIK_GRAFIK_URL— Basis-URL des internen Statistik-Portals (z. B.https://sternwarte-welzheim.de/intern/statistik).STATISTIK_GRAFIK_USER— Benutzername für Basic-Auth.STATISTIK_GRAFIK_PASS— Passwort für Basic-Auth.
-
UI-Änderung:
- Der
Grafik-Button in der Statistik-Ansicht öffnet jetzt die Statistik-Seite in einem neuen Fenster (window.open('/api/statistik/grafik', '_blank')). Die vorherige iframe-Integration wurde entfernt, da Browser (insb. Firefox/Safari) bei Einbettung Probleme mit X-Frame-Options/CSP gemacht haben.
- Der
-
Middleware / Sicherheit:
- Die Proxy-Route wird in der App-Auth-Middleware erlaubt, so dass der Proxy die Statistik-Seite auch ohne Benutzer-Session laden kann (Zugangskontrolle erfolgt über die serverseitigen Basic-Auth-Variablen).
-
Datenbank-Backup:
- Das neue Skript
backup_db.sherzeugt ein tägliches MySQL-Dump-Backup im VerzeichnisDB_BACKUP/. - Standardmäßig werden Backups älter als 7 Tage automatisch gelöscht.
- Beispiel-Cron-Eintrag für täglich 02:00 Uhr:
- Das neue Skript
0 2 * * * cd /pfad/zum/repo && DB_ROOT_PASS=deinrootpass DB_NAME=sternwarte ./backup_db.sh --days 7
Hinweis: Speichere sensible Zugangsdaten nicht in Repositories. Setze die drei STATISTIK_... Variablen in deiner Deployment-Umgebung (z. B. Docker secrets, CI/CD environment variables oder auf dem Server). Die Proxy-Implementierung entfernt framing-blockierende Header und schiebt relative Asset-Pfade durch den Proxy, um Kompatibilitätsprobleme mit Browsern zu vermeiden.
Test, ob das nun Deployed, wenn auf main gepushed wird.