ASP.NET Core offers a simplified hosting model, called minimal APIs, that allows us to build lightweight APIs with minimal dependencies. Although minimal APIs don’t use controllers, and require only minimal code and minimal configuration, they nevertheless allow us to implement advanced features and important security mechanisms such as Cross-Origin Resource Sharing, or CORS. In this post, we’ll examine how we can work with CORS in minimal APIs in ASP.NET Core. To use the code examples pr...