uniapp反向代理

2022-03-02  本文已影响0人  秀萝卜

https://www.cnblogs.com/gxp69/p/13099074.html

"h5" : {
        "devServer" : {
             "port" : 8080, //端口号
              "disableHostCheck" : true,
              "proxy" : {
                  "/api" : {
                      "target" : "https://wx.heb*****.com", //目标接口域名
                       "changeOrigin" : true,  //是否跨域
                       "secure" : true,  // 设置支持https协议的代理
                        "pathRewrite": {  
                           "^/api": ""  
                       }  
                 }
            }
        }
    }
上一篇 下一篇

猜你喜欢

热点阅读