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

后端 未结 7 761
天命终不由人
天命终不由人 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();
                });
    
    0 讨论(0)
提交回复
热议问题