Walk us through your approach to designing RESTful APIs. What are some best practices followed to ensure API scalability, maintainability, and security? How would you handle cross-origin resource sharing (CORS) issues in a web application? What are the potential security implications, and how can they be mitigated?