Why errors happen
Browsers block cross-origin API calls by default. The server must return allowed CORS headers.
Practical checklist
- Allow frontend origin (e.g.,
http://localhost:5173) - Set
allow_methodsandallow_headers - If using cookies, verify
allow_credentials
Troubleshooting