webpack中代理的配置-proxy

 // 接口代理示例
  proxy: {
    "/boss": {
      "target": "https://test-overseas.91dbq.com",
      "changeOrigin": true, //如果跨域,需要配置这个参数
      "secure":false, //如果是https请求,要配置这个参数
      "pathRewrite": { "^/boss" : "/boss-gateway-sg/boss" }
    }
  },

你可能感兴趣的:(webpack中代理的配置-proxy)