Trouble with CORS Policy and .NET Core 3.1

前端 未结 10 1321
借酒劲吻你
借酒劲吻你 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:43

    In my situation it was related to the Content-Type of the header being application/json.

    Only those Content-Type headers are allowed with CORS:

    application/x-www-form-urlencoded

    multipart/form-data

    text/plain

提交回复
热议问题