Home >Web Front-end >uni-app >How to set up proxy in uniapp
How to set up the proxy for uniapp: First open HbuilderX and find the [manifest.json] file; then find the configuration information of the h5 location, add the proxy configuration information; and finally restart the project.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, thinkpad t480 computer.
Recommended (free): uni-app development tutorial
Uniapp method to set up a proxy:
Open HbuilderX and find the manifest.json file, click on the source code view, as shown below:
Find the configuration information of the h5 location and add the proxy configuration information. As follows:
Add proxy proxy configuration item content in devServer
"devServer" : { "https" : false, "proxy": { "/web": { "target": "http://dev.demo.com", "changeOrigin": true, "secure": false, "pathRewrite": { "^/web": "/" } } } },
Then restart the project, it will be ok
Related free recommendations: Programming video courses
The above is the detailed content of How to set up proxy in uniapp. For more information, please follow other related articles on the PHP Chinese website!