ASP.NET 5/Core/vNext CORS not working even if allowing pretty much everything

后端 未结 9 1475
忘了有多久
忘了有多久 2020-12-10 12:24

I have a ASP.NET 5 Web API (Well, MVC now anyway) back-end which I am consuming in with the axios library in my JS app.

My CORS config in MVC is the following:

9条回答
  •  感动是毒
    2020-12-10 12:45

    If you're using UseHttpsRedirection, make sure your app is calling the https URL and not the http one or you'll get a CORS error even though the Accept-Header-Allow-Origin header is returned.

提交回复
热议问题