代理配置
This commit is contained in:
		
							parent
							
								
									816459df73
								
							
						
					
					
						commit
						27a654c246
					
				@ -35,9 +35,16 @@ module.exports = {
 | 
			
		||||
    overlay: {
 | 
			
		||||
      warnings: false,
 | 
			
		||||
      errors: true
 | 
			
		||||
    }
 | 
			
		||||
    },
 | 
			
		||||
    // before: require('./mock/mock-server.js')
 | 
			
		||||
 | 
			
		||||
    // 代理配置
 | 
			
		||||
    proxy: {
 | 
			
		||||
      '/api': { // 这里的api 表示如果我们的请求地址有/api的时候,就出触发代理机制
 | 
			
		||||
        target: 'http://ihrm-java.itheima.net', // 我们要代理的地址
 | 
			
		||||
        changeOrigin: true
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  configureWebpack: {
 | 
			
		||||
    // provide the app's title in webpack's name field, so that
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user