美文网首页
webpack中代理的配置-proxy

webpack中代理的配置-proxy

作者: _咻咻咻咻咻 | 来源:发表于2021-01-25 14:38 被阅读0次
 // 接口代理示例
  proxy: {
    "/boss": {
      "target": "https://test-overseas.91dbq.com",
      "changeOrigin": true, //如果跨域,需要配置这个参数
      "secure":false, //如果是https请求,要配置这个参数
      "pathRewrite": { "^/boss" : "/boss-gateway-sg/boss" }
    }
  },

相关文章

网友评论

      本文标题:webpack中代理的配置-proxy

      本文链接:https://www.haomeiwen.com/subject/hpzbzktx.html