CORS enabled but response for preflight has invalid HTTP status code 404 when POSTing JSON

后端 未结 7 763
天命终不由人
天命终不由人 2020-12-01 16:04

I\'ve searched thoroughly but cannot find a solution to this issue in my particular circumstance.

Cross-domain service calls using Fiddler (POST) execute correctly a

7条回答
  •  悲哀的现实
    2020-12-01 16:51

    For asp core use this code in Startup.cs in Configure procedure. I used for 2.0 version but i think it should work with older too

    app.UseCors(builder => {
                    builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader();
                });
    

提交回复
热议问题