Angular 2 - always redirect to https:// instead of using http://

前端 未结 3 1426
挽巷
挽巷 2021-01-19 23:57

I have an Angular 2 app that I only want to run on https. What is the best way to redirect addresses that use http to use https instead?

3条回答
  •  野性不改
    2021-01-20 00:20

    I have added a web.config to the Angular2 site which contains the below. Remember that this is for an IIS hosted application. All addresses are now redirected the https version.

    
    
        
            
                
                    
                    
                        
                        
                            
                        
                        
                    
                
            
        
    
    

提交回复
热议问题