请问如何配置外部web服务器,我配置完后,仍旧打开的localhost, 另外请问uni-app 运行到浏览器时,生成的编译后文件在哪,即需要把外部的web服务器的 项目目录设置到哪里? 因为我们项目部分接口是基于cookie的, 写到了指定的域下,所以localhost 无法使用;不知道是否有其它方式??
路人甲2020
能否发下devserver配置。我也遇到这个问题了
2020-04-15 13:47
6***@qq.com (作者)
回复 路人甲2020: 建议在服务器上做好反向代理,如服务器上不能做,再本地做,下面注释的部分
"h5" : {
"devServer" : {
"port" : 9090,
"host" : "aaa.xx.cn",
"disableHostCheck" : true,
// "proxy" : {
// "/uc-api" : {
// "target" : "http://bb.xx.cn",
// "changeOrigin" : true,
// "pathRewrite" : {
// "^/uc-api" : ""
// },
// "logLevel" : "debug",
// "secure" : false
// }
// }
},
"uniStatistics" : {
"enable" : false
}
}
2020-04-15 14:16
路人甲2020
回复 6***@qq.com: 收到。谢谢
2020-04-15 15:51