Angular2 to REST WebApi CORS issue

后端 未结 10 1935
太阳男子
太阳男子 2020-12-15 06:50

I\'m using an angular2 front end and WebApi backend. The webapi is CORS enabled

var cors = new EnableCorsAttribute(\"*\", \"*\", \"*\");
GlobalConfiguration.         


        
10条回答
  •  温柔的废话
    2020-12-15 06:54

    Do you have any options set into your web.config file for cors ? i.e something like

    If yes make sure to remove that, and control the cors through the code only.

    The Answer here will help you.

提交回复
热议问题