I want to use Ionic's Proxies feature in an Ionic Vuejs project.
I have seen questions and answers for proxy problems with Ionic + Angular, and for Vue + Webpack, but couldn't find a solution for my Ionic + Vue problem.
For now I am just working in a browser (i.e. and not building for native yet).
I followed the instructions, and my ionic.config.json
now looks like this:
{
"name": "myapp",
"integrations": {
"capacitor": {}
},
"type": "vue",
"proxies": [
{
"path": "/webhp",
"proxyUrl": "https://www.google.com"
}
]
}
I run ionic serve --no-open
and browse to http://localhost:8100/webhp.
The request is not proxied, my app is loaded, and I get a router error: [Vue Router warn]: No match found for location with path "/goto"
.
When I try to access that URL using an AJAX request in my code:
await axios.post("/webhp");
I get an error:
I am using Ionic CLI 6.12.2
and Ionic Framework @ionic/vue 5.5.2
.
What am I doing wrong?