uni-app配置跨域

 

 

 

 

"h5":{
        "devServer" : {
            "https" : false,
            "proxy": {  
                "/": {  
                    "target": "http://xmxxxxpi.zxxxxxlxxun.top/api", //并非真是接口
                    "changeOrigin": true,   
                    "secure": false,
                    "pathRewrite": {
                        "^/": "/"  
                    }  
                }  
            }  
        }
    }

 

使用

uni-app配置跨域

 

 

注意: 需要从新编译运行

 

 

相关文章:

  • 2022-01-07
  • 2021-07-20
  • 2021-10-12
  • 2022-12-23
  • 2019-07-22
  • 2020-07-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-10
  • 2021-07-15
  • 2021-08-11
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案