Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
25 lines
555 B
Caddyfile
25 lines
555 B
Caddyfile
# HTTPS mit automatischem Zertifikat für Produktion und Testumgebung.
|
|
# Bis zur eigenen Benutzerverwaltung (Modul 16) schützt eine Anmeldung am Proxy
|
|
# das Programm; der Name geht als X-Benutzer an die App und ins Änderungsprotokoll.
|
|
(anmeldung) {
|
|
basic_auth {
|
|
{$APP_BENUTZER} {$APP_PASSWORT_HASH}
|
|
}
|
|
}
|
|
|
|
{$DOMAIN} {
|
|
encode gzip
|
|
import anmeldung
|
|
reverse_proxy app:3000 {
|
|
header_up X-Benutzer {http.auth.user.id}
|
|
}
|
|
}
|
|
|
|
{$TEST_DOMAIN} {
|
|
encode gzip
|
|
import anmeldung
|
|
reverse_proxy app-test:3000 {
|
|
header_up X-Benutzer {http.auth.user.id}
|
|
}
|
|
}
|