### fix: verbessere CORS-Konfiguration
All checks were successful
All checks were successful
- **GlobalSecurityConfig:** Füge `allowedOriginPatterns` für Subdomains von `mo-code.at` hinzu. - **UI:** Aktualisiere Versionsmarker auf `v2026-04-23.18 - RADICAL CORS PERMISSIVENESS`.
This commit is contained in:
parent
92950dbbe6
commit
636ecc9883
|
|
@ -86,8 +86,12 @@ class GlobalSecurityConfig {
|
||||||
"https://api.mo-code.at",
|
"https://api.mo-code.at",
|
||||||
"http://localhost:8080",
|
"http://localhost:8080",
|
||||||
"http://localhost:8083",
|
"http://localhost:8083",
|
||||||
|
"http://localhost:8092",
|
||||||
"http://localhost:4000"
|
"http://localhost:4000"
|
||||||
)
|
)
|
||||||
|
configuration.allowedOriginPatterns = listOf(
|
||||||
|
"https://*.mo-code.at"
|
||||||
|
)
|
||||||
configuration.allowedMethods = listOf("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
configuration.allowedMethods = listOf("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||||
configuration.allowedHeaders = listOf("*")
|
configuration.allowedHeaders = listOf("*")
|
||||||
configuration.allowCredentials = true
|
configuration.allowCredentials = true
|
||||||
|
|
|
||||||
|
|
@ -57,3 +57,10 @@ Die "Hallo Du!" Test-UI wurde durch produktive, fachlich korrekte Formulare erse
|
||||||
- **Lösung**:
|
- **Lösung**:
|
||||||
- `build.gradle.kts` (mail-service): `spring-boot-starter-security`, `spring-boot-starter-oauth2-resource-server` und das `infrastructure:security` Modul explizit als Abhängigkeiten hinzugefügt.
|
- `build.gradle.kts` (mail-service): `spring-boot-starter-security`, `spring-boot-starter-oauth2-resource-server` und das `infrastructure:security` Modul explizit als Abhängigkeiten hinzugefügt.
|
||||||
- UI-Marker auf `v2026-04-23.17 - SECURITY DEPENDENCY FIX` aktualisiert.
|
- UI-Marker auf `v2026-04-23.17 - SECURITY DEPENDENCY FIX` aktualisiert.
|
||||||
|
|
||||||
|
### v2026-04-23.18 - RADICAL CORS PERMISSIVENESS
|
||||||
|
- **Problem**: Trotz hinzugefügter Security-Abhängigkeiten wurde der CORS-Header `Access-Control-Allow-Origin` weiterhin blockiert (Preflight-Failure).
|
||||||
|
- **Lösung**:
|
||||||
|
- `GlobalSecurityConfig.kt`: `allowedOriginPatterns` mit `https://*.mo-code.at` hinzugefügt, um alle Subdomains von mo-code.at explizit abzudecken.
|
||||||
|
- Prüfung der Filterkette: Sichergestellt, dass `.cors()` vor der Authentifizierung konfiguriert ist (bereits korrekt, aber durch Patterns verstärkt).
|
||||||
|
- **Status**: Bereit zum Test. Versionsmarker auf v18 aktualisiert.
|
||||||
|
|
|
||||||
|
|
@ -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.17 - SECURITY DEPENDENCY FIX",
|
text = "v2026-04-23.18 - RADICAL CORS PERMISSIVENESS",
|
||||||
style = MaterialTheme.typography.labelSmall,
|
style = MaterialTheme.typography.labelSmall,
|
||||||
color = Color.LightGray.copy(alpha = 0.5f)
|
color = Color.LightGray.copy(alpha = 0.5f)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user