Hello I am using Angular 6 and I am trying to a http post.
I know the user is allowing Multiple origins with the
<httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*"/> </customHeaders>
my code:
let data = this.http.post(
this.base_url + this.walletControllerSubUrl +"login",
{username: "exampleuser", password: "Pass123!"}
);
data.subscribe(data => console.log(data));
console.log("data" + data);
return data;
I always get the error:
" Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8100, *', but only one is allowed"
but I also now noticed that my header seems to go null
headers: Object { normalizedNames: Map(0), lazyUpdate: null, headers: Map(0) }
what would cause the header to be null when I not even passing any header?
There is another application but in AngularJS, running well with the same post.
what would cause this?