{ debug } # Entwicklungsumgebung - Localhost und Raspberry Pi Backend localhost, 127.0.0.1 { # API Anfragen zum Raspberry Pi Backend weiterleiten @api { path /api/* /health } handle @api { uri strip_prefix /api reverse_proxy 192.168.0.105:5000 { header_up Host {upstream_hostport} header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} header_up X-Forwarded-Proto {scheme} } } # Alle anderen Anfragen zum Frontend weiterleiten handle { reverse_proxy myp-rp-dev:3000 { header_up Host {upstream_hostport} header_up X-Real-IP {remote_host} header_up X-Forwarded-For {remote_host} header_up X-Forwarded-Proto {scheme} } } # TLS für Entwicklung deaktiviert tls off # OAuth Callbacks für Entwicklung @oauth path /auth/login/callback* handle @oauth { header Cache-Control "no-cache" reverse_proxy myp-rp-dev:3000 } # Entwicklungsfreundliche Header header { # Weniger restriktive Sicherheitsheader für Entwicklung X-Content-Type-Options "nosniff" X-Frame-Options "SAMEORIGIN" # Keine Caches für Entwicklung Cache-Control "no-store, no-cache, must-revalidate" # CORS für Entwicklung Access-Control-Allow-Origin "*" Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" Access-Control-Allow-Headers "Content-Type, Authorization" } }