I have following code
services.AddCors(options => options.AddPolicy("AllowAll", p => p.AllowAnyOrigin() .AllowAnyMethod() .WithHeaders("accept", "origin", "user-agent")));
but my requests are rejected:
XMLHttpRequest cannot load http://localhost:25526/product/GetProducts?listingTypeId=1&page=0&pageSize=10. 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:8100' is therefore not allowed access.
I can see through browser that the three headers are included in the request.
Does anyone knows why?
Thanks in advance