### fix: verbessere CORS-Handling im Caddy-Proxy
All checks were successful
All checks were successful
- **Caddyfile:** `Access-Control-Allow-Headers` auf `*` gelockert, Versionsmarkers angepasst. - **UI:** Aktualisierung des Versionsmarkers auf `v2026-04-23.25 - CADDY CATCH-ALL CORS`. - **Docs:** Ergänzung der Analyse und Lösung für Version 25.
This commit is contained in:
parent
02a778751a
commit
f97bfeff47
|
|
@ -17,17 +17,18 @@
|
|||
|
||||
encode gzip zstd
|
||||
|
||||
# Reverse Proxy: Plan-B leitet nur /api/mail an den Mail-Service weiter
|
||||
# CORS-Handshaking direkt im Proxy
|
||||
# Wir erlauben ALLES für die Domain mo-code.at im Plan-B Modus
|
||||
handle /api/mail/* {
|
||||
@options method OPTIONS
|
||||
handle @options {
|
||||
header {
|
||||
Access-Control-Allow-Origin "https://app.mo-code.at"
|
||||
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
|
||||
Access-Control-Allow-Headers "*"
|
||||
Access-Control-Allow-Credentials "true"
|
||||
Access-Control-Max-Age "3600"
|
||||
X-Caddy-CORS "preflight"
|
||||
X-Caddy-CORS "preflight-v25"
|
||||
}
|
||||
respond "" 204
|
||||
}
|
||||
|
|
@ -35,9 +36,9 @@
|
|||
header {
|
||||
Access-Control-Allow-Origin "https://app.mo-code.at"
|
||||
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
||||
Access-Control-Allow-Headers "Content-Type, Authorization, X-Requested-With"
|
||||
Access-Control-Allow-Headers "*"
|
||||
Access-Control-Allow-Credentials "true"
|
||||
X-Caddy-CORS "forward"
|
||||
X-Caddy-CORS "forward-v25"
|
||||
defer
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,3 +100,10 @@ Die "Hallo Du!" Test-UI wurde durch produktive, fachlich korrekte Formulare erse
|
|||
- Hinzufügen von `X-Requested-With` zu den erlaubten Headern (oft von KMP/Ktor-Clients verwendet).
|
||||
- Entfernung von `*` aus den Allowed-Headers, um maximale Kompatibilität mit restriktiven Browsern sicherzustellen.
|
||||
- **Status**: Versionsmarker auf v2026-04-23.24 aktualisiert.
|
||||
|
||||
### v2026-04-23.25 - CADDY CATCH-ALL CORS
|
||||
- **Problem**: Preflight (OPTIONS) weiterhin blockiert (v24). Wahrscheinlich waren die Header-Beschränkungen in v24 immer noch zu strikt für den Ktor/Wasm Client.
|
||||
- **Lösung**:
|
||||
- `Caddyfile` radikal gelockert: `Access-Control-Allow-Headers` auf `*` gesetzt.
|
||||
- CORS-Identifikatoren auf `-v25` aktualisiert, um sicherzugehen, dass der frische Proxy-Stand aktiv ist.
|
||||
- **Status**: Versionsmarker auf v2026-04-23.25 aktualisiert. Finaler Versuch vor der Deadline.
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ fun MainAppContent() {
|
|||
// Dezentraler Versions-Marker in der unteren rechten Ecke
|
||||
Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) {
|
||||
Text(
|
||||
text = "v2026-04-23.24 - CADDY CORS FINAL BOSS",
|
||||
text = "v2026-04-23.25 - CADDY CATCH-ALL CORS",
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = Color.LightGray.copy(alpha = 0.5f)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user