### fix: behebe CORS-Probleme und Stabilitätsfehler
Build and Publish Docker Images / build-and-push (., backend/services/mail/Dockerfile, mail-service, mail-service) (push) Successful in 6m0s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 3m55s

- **MailController:** Erweitere `@CrossOrigin`-Headers und Methoden für Preflight-Checks.
- **GlobalSecurityConfig:** Reaktiviere CORS und füge explizite `CorsConfigurationSource` hinzu.
- **Tests:** Fix für `NoSuchBeanDefinitionException` bei Integrationstests.
- **UI:** Aktualisiere Versionsmarker auf `v2026-04-23.15 - CORS STABILITY`.
This commit is contained in:
2026-04-23 10:53:52 +02:00
parent af02e14f2d
commit 3244efd5e0
4 changed files with 48 additions and 7 deletions
@@ -39,7 +39,11 @@ data class NennungRequest(
@OptIn(ExperimentalUuidApi::class)
@RestController
@RequestMapping("/api/mail")
@CrossOrigin(origins = ["http://localhost:8080", "https://nennung.mo-code.at", "https://app.mo-code.at"]) // Für Wasm-Web-App (Compose HTML/Wasm)
@CrossOrigin(
origins = ["http://localhost:8080", "https://nennung.mo-code.at", "https://app.mo-code.at", "https://api.mo-code.at"],
allowedHeaders = ["*"],
methods = [RequestMethod.GET, RequestMethod.POST, RequestMethod.PUT, RequestMethod.DELETE, RequestMethod.OPTIONS]
) // Für Wasm-Web-App (Compose HTML/Wasm)
class MailController(
private val nennungRepository: NennungRepository,
private val mailSender: JavaMailSender