CORS (Cross-Origin Resource Sharing) yaiku mekanisme keamanan browser sing ngontrol apa halaman web saka siji origin bisa manggil API mu ing origin liyane. FastAPI ngaturé nganggo CORSMiddleware sing wis dibangun. Sampéyan bakal ketemu CORS saben-saben frontend ing domain/port beda manggil API mu.
Masalah sing ditangani CORS
A React app at http://localhost:3000 calling an API at http://localhost:8000 is
CROSS-ORIGIN (different port). The BROWSER blocks the response unless the API
sends CORS headers permitting that origin.
(origin = scheme + host + port)
