Understanding CORS: A Comprehensive Guide for Developers