CORS POST Requests not working - OPTIONS (Bad Request) - The origin is not allowed

后端 未结 5 1523
不思量自难忘°
不思量自难忘° 2020-12-13 19:01

I\'m having a lot of trouble getting a cross domain POST request to hit an Api controller in the latest beta 2 release.

Chrome (and other browsers) spit out:

5条回答
  •  遥遥无期
    2020-12-13 19:27

    Add this to your startup.cs file inside ConfigureOAuth

    app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);

提交回复
热议问题