Browse Source

配置 后端接口 代理

huxz 8 years ago
parent
commit
c9da9a7765
1 changed files with 7 additions and 1 deletions
  1. 7 1
      sso-manage-console-web/config/index.js

+ 7 - 1
sso-manage-console-web/config/index.js

@@ -10,7 +10,13 @@ module.exports = {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
-    proxyTable: {},
+    proxyTable: {
+      // proxy all backend requests to backend server
+      '/api': {
+        target: 'http://localhost:8090',
+        changeOrigin: true
+      }
+    },
 
     // Various Dev Server settings
     host: 'localhost', // can be overwritten by process.env.HOST