Setting Authorization Basic header results  Access-Control-Allow-Origin error.

login:1 XMLHttpRequest cannot load http://<ens_host>:57773/csp/nnn/login. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

I have cors enabled in the service and the service works just fine with 

curl -H "Authorization: Basic <base64_coded_username_password>" ur

l

So it looks like Chrome wants to perform OPTIONS request in stead of plain GET and things go wrong there after and this might be a combination of many things. 

I anyone has any ideas, I would appreciate.

-Pasi-