title: What are the best practices to enable CORS for docker containerized ASP.NET core app
body: <p>What are the best practices to enable CORS in asp.net core api, which is containerized to docker container? Docker compose is used.</p>
  
  <p>For asp.net core API cors is enabled in Startup.cs. In Debug mode there are no issues with CORS. But when I put this application into Docker container, CORS headers are missing.</p>
  
  <p>I have read about Nginx, but it`s not the best approach for me.</p>
  
  <p>I have Angular 6 on the frontend. On the backend I have ASP.NET Core API.
  Basically when I run asp.net core application in debug mode, it can be invoked from local front-end. When I added and run my backend in Docker container I am not able to invoke it from Front-end. </p>
  
  <p>Error I have:
  - No 'Access-Control-Allow-Origin' header is present on the requested resource.</p>