AngularJS Allow-Origin to WebApi2

后端 未结 3 1565
梦如初夏
梦如初夏 2021-01-24 03:10

I want to host my API on a separate domain. I have configured my auth-interceptor for token in angular with a bearer:

config.headers.Authorization = \'Bearer \'         


        
3条回答
  •  死守一世寂寞
    2021-01-24 03:29

    I've had the same issue before and what worked for me was to remove the settings from the web.config and just leave the configuration settings in the WebApiConfig class

    See this answer for more details

提交回复
热议问题