AngularJS Allow-Origin to WebApi2

后端 未结 3 1560
梦如初夏
梦如初夏 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:37

    In web.config of API, include the below mentioned code:

        
        
              
                
                
              
            
     
          
          
          
          
          
          
          
        
         
    

    I hope this helps.

    Thanks.

提交回复
热议问题