Encountered a CORS error when attempting to retrieve data from a web API using Angular

localhost/:1 Access to XMLHttpRequest at ‘http://localhost:9000/api/components/search?qualifiers=TRK’ from origin ‘http://localhost:4200’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Hi,

Welcome to the community!

Perhaps this SO answer will help.

 
Ann