Wichtel-Werkstatt: Secret-Santa-App mit Räumen, Ausschlüssen und Recovery-Links
- FastAPI + SQLite, serverseitig gerenderte Templates, mobil-zuerst - Admin-Passwort, einseitige Ausschlüsse, eingefrorene Auslosung - Teilnehmer sehen Ergebnis per Cookie; Einmal-Recovery-Links bei Verlust - Docker/podman-tauglich (Entrypoint mit Privilegien-Drop, SELinux-:z) - Unit-Tests für Auslosung, E2E-Testskript (30 Checks)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# Beispiel: Wichtel-Werkstatt hinter nginx als Reverse Proxy.
|
||||
# Der Container lauscht auf 127.0.0.1:8000 (siehe docker-compose.yml).
|
||||
#
|
||||
# HTTPS wird dringend empfohlen – ohne HTTPS werden die Cookies (und damit
|
||||
# die Ergebnisse) unverschlüsselt übertragen. Zertifikate z. B. via certbot:
|
||||
# certbot --nginx -d wichteln.example.org
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name wichteln.example.org;
|
||||
|
||||
# Optional: HTTP komplett auf HTTPS umleiten
|
||||
# return 301 https://$host$request_uri;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
|
||||
# Wichtig: Host und Protokoll weiterreichen, damit die App
|
||||
# korrekte Links erzeugt und Cookies das Secure-Flag bekommen.
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user