Files
wichteln/nginx.example.conf
T
nico d56be7b2c0 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)
2026-08-05 16:07:21 +02:00

29 lines
975 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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;
}
}