introduce @ gauseen/nuxt-proxy module into nuxt.js to solve interface cross-domain restrictions, but page access error
nuxt.config.js
module.exports = {
...
modules: [
//
"@gauseen/nuxt-proxy",
],
proxyTable: [
"/api",
{
target: "http://192.168.1.181:3004", // api
ws: true,
pathRewrite: { "^/api": "/" }
}
]
...
}
axios
axios.post("/login", data)
but just comment out the proxyTable, page reply visit, what is the cause? Is there a solution