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

后端 未结 9 1482
忘了有多久
忘了有多久 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

    The problem was actually in the fact that there was an exception in the action processing the POST request and as Norgerman mentioned, the default exception handler cleared the CORS headers.

提交回复
热议问题