uni-app web 模式跨域问题
uni-app 跨域 反向代理 About 443 words解决方法
打开manifest.json
,在源码试图(HBuilder
中打开才有)或者以文本形式打开。
添加h5
节点,指定devServer
及proxy
。注意:重新运行工程。
{
"h5": {
"router": {
"mode": "history"
},
"devServer": {
"port": 5173,
"proxy": {
"/api": {
"target": "http://localhost:8080",
"changeOrigin": true,
"secure": false
}
}
}
}
}
Views: 21 · Posted: 2025-07-19
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓

Loading...