### fix: implementiere Same-Origin-Strategie zur Umgehung von CORS
- **PlatformConfig.wasmJs.kt:** API-URLs auf relative Pfade (`/api`) geändert. - **Caddyfile:** `/api/*` Anfragen intern weitergeleitet, `/api` Präfix entfernt. Header angepasst. - **UI:** Versionsmarker auf `v2026-04-23.27 - SAME-ORIGIN PROXY` aktualisiert. - **Docs:** Analyse und Lösung zur neuen Strategie hinzugefügt.
This commit is contained in:
+4
-4
@@ -7,8 +7,8 @@ package at.mocode.frontend.core.network
|
||||
@Suppress("EXPECT_ACTUAL_CLASSIFIERS_ARE_IN_BETA_WARNING")
|
||||
actual object PlatformConfig {
|
||||
actual fun resolveMailServiceUrl(): String {
|
||||
// FORCE HTTPS for Plan-B Weekend
|
||||
return "https://api.mo-code.at"
|
||||
// SAME-ORIGIN Strategy: Use relative path to bypass CORS
|
||||
return "/api"
|
||||
}
|
||||
|
||||
actual fun resolveKeycloakUrl(): String {
|
||||
@@ -20,8 +20,8 @@ actual object PlatformConfig {
|
||||
}
|
||||
|
||||
actual fun resolveApiBaseUrl(): String {
|
||||
// FORCE HTTPS for Plan-B Weekend
|
||||
return "https://api.mo-code.at"
|
||||
// SAME-ORIGIN Strategy: Use relative path to bypass CORS
|
||||
return "/api"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -126,7 +126,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.26 - NUCLEAR CORS v2",
|
||||
text = "v2026-04-23.27 - SAME-ORIGIN PROXY",
|
||||
style = MaterialTheme.typography.labelSmall,
|
||||
color = Color.LightGray.copy(alpha = 0.5f)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user