Trouble with CORS Policy and .NET Core 3.1

前端 未结 10 1346
借酒劲吻你
借酒劲吻你 2020-12-29 20:04

I\'m not sure what I\'m missing, but can\'t seem to get my CORS Policy working with .NET Core 3.1 and Angular 8 client-side.

Startup.cs:



        
10条回答
  •  误落风尘
    2020-12-29 20:47

    Web API is using app.UseHttpsRedirection(); which cause CORS issue if requesting client is not https based. So in order to use it with http client we need to comment or remove that line.

    This issue is not with CORS, the https is causing this issue but thrown error is saying its with CORS.

提交回复
热议问题