CORS (Cross-Origin Resource Sharing) minangka mekanisme keamanan browser sing ngontrol apa-apa halaman web saka siji origin bisa nggawe requests menyang server ing origin sing beda. Secara baku, browser ngalangi cross-origin requests; server kudu ngijini kanthi eksplisit liwat response headers.
Kebijakan same-origin lan masalahé
Origin = scheme + host + port. These are DIFFERENT origins:
https://app.example.com → https://api.example.com (different host)
http://localhost:3000 → http://localhost:4000 (different port)
Browser blocks the cross-origin request UNLESS the server sends CORS headers allowing it.
