What is the purpose of cross-origin resource sharing (CORS) in API integration?
Cross-origin resource sharing (CORS) in API integration is used to allow web applications hosted on different domains to access each other's resources securely. It enables controlled sharing of resources across different origins while preventing unauthorized access or data leakage.