CORS-Origins konfigurierbar machen für Production-Deployment #84
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Beschreibung
In
backend/main.py:215-221sind die CORS-Origins aufhttp://localhost:{frontend_port}hardcoded. In Production (anderer Host, HTTPS, Reverse Proxy) werden alle Frontend-Requests vom Browser geblockt.Hintergrund
CORS ist ein Browser-Sicherheitsmechanismus. Wenn das Frontend auf
https://bruno.example.comläuft aber CORS nurhttp://localhost:3000erlaubt, funktioniert die Anwendung nicht.Akzeptanzkriterien
CORS_ORIGINSals kommaseparierte Listehttp://localhost:3000(Abwärtskompatibel)*möglich aber mit Warnung im LogTechnische Hinweise
backend/main.py,backend/config.pycors_origins: str = "http://localhost:3000", Split auf,Aufwand: S