### fix: verbessere CORS-Handling im Caddy-Proxy
- **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:
@@ -17,17 +17,18 @@
|
|||||||
|
|
||||||
encode gzip zstd
|
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/* {
|
handle /api/mail/* {
|
||||||
@options method OPTIONS
|
@options method OPTIONS
|
||||||
handle @options {
|
handle @options {
|
||||||
header {
|
header {
|
||||||
Access-Control-Allow-Origin "https://app.mo-code.at"
|
Access-Control-Allow-Origin "https://app.mo-code.at"
|
||||||
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
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-Allow-Credentials "true"
|
||||||
Access-Control-Max-Age "3600"
|
Access-Control-Max-Age "3600"
|
||||||
X-Caddy-CORS "preflight"
|
X-Caddy-CORS "preflight-v25"
|
||||||
}
|
}
|
||||||
respond "" 204
|
respond "" 204
|
||||||
}
|
}
|
||||||
@@ -35,9 +36,9 @@
|
|||||||
header {
|
header {
|
||||||
Access-Control-Allow-Origin "https://app.mo-code.at"
|
Access-Control-Allow-Origin "https://app.mo-code.at"
|
||||||
Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS"
|
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-Allow-Credentials "true"
|
||||||
X-Caddy-CORS "forward"
|
X-Caddy-CORS "forward-v25"
|
||||||
defer
|
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).
|
- 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.
|
- Entfernung von `*` aus den Allowed-Headers, um maximale Kompatibilität mit restriktiven Browsern sicherzustellen.
|
||||||
- **Status**: Versionsmarker auf v2026-04-23.24 aktualisiert.
|
- **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.
|
||||||
|
|||||||
+1
-1
@@ -124,7 +124,7 @@ fun MainAppContent() {
|
|||||||
// Dezentraler Versions-Marker in der unteren rechten Ecke
|
// Dezentraler Versions-Marker in der unteren rechten Ecke
|
||||||
Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) {
|
Box(modifier = Modifier.fillMaxSize().padding(8.dp), contentAlignment = Alignment.BottomEnd) {
|
||||||
Text(
|
Text(
|
||||||
text = "v2026-04-23.24 - CADDY CORS FINAL BOSS",
|
text = "v2026-04-23.25 - CADDY CATCH-ALL CORS",
|
||||||
style = MaterialTheme.typography.labelSmall,
|
style = MaterialTheme.typography.labelSmall,
|
||||||
color = Color.LightGray.copy(alpha = 0.5f)
|
color = Color.LightGray.copy(alpha = 0.5f)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user