### fix: verbessere CORS-Handling im Caddy-Proxy
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 5m47s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 3m54s

- **Caddyfile:** Verlagerung des CORS-Handlings in den Reverse Proxy, inkl. Unterstützung für Preflight-Anfragen und Header-Optimierungen.
- **UI:** Aktualisierung des Versionsmarkers auf `v2026-04-23.21 - CADDY CORS PROXY FIX`.
- **Docs:** Ergänzung der Problem- und Lösungshistorie für Version 21.
This commit is contained in:
2026-04-23 13:02:49 +02:00
parent 16c8674eff
commit 71aea3f41d
3 changed files with 28 additions and 1 deletions
+19
View File
@@ -19,6 +19,25 @@
# Reverse Proxy: Plan-B leitet nur /api/mail an den Mail-Service weiter (kein API-Gateway nötig)
handle /api/mail/* {
# CORS Handshake direkt im Proxy abfangen (Plan-B radikal)
@options method OPTIONS
header @options {
Access-Control-Allow-Origin "https://app.mo-code.at"
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Access-Control-Allow-Headers "*"
Access-Control-Allow-Credentials "true"
Access-Control-Max-Age "3600"
}
respond @options 204
# CORS Header auch für die eigentlichen Antworten (GET/POST) setzen
header {
Access-Control-Allow-Origin "https://app.mo-code.at"
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
Access-Control-Allow-Headers "*"
Access-Control-Allow-Credentials "true"
}
reverse_proxy mail-service:8085
}