CORS troubleshooting

Diagnose and fix common Cross-Origin Resource Sharing (CORS) errors including missing headers, blocked origins, and file protocol issues.