ProxyTable for Ajax Requests is not working
-
Hey,
I built app using quasar, and I decided to upgrade the project to use quasar webpack 2.
So after I create new project and move the components and everything I have one big problem.For making api request Im using ProxyTable option in config/index.js for proxing ajax requests.
The problem is its not working… In the previous project it used to work.
This is my config/index.js file:
https://pastebin.com/brE3zeRZI really need to work on this app but I cant to send any ajax request…
The proxy is not do anything…Thanks.
-
I can confirm it works. It depends on how you did the upgrade. Maybe you missed something?
-
@rstoenescu I just placed the config like you see in pastebin. and then make ajax request using axios/vue-resource with url /api/… and its try to send request to localhost:8080/… and not proxy the request. get error 500 in network
-
Lose the asterisk character:
/api*
should be/api
. -
Still not working.
This is the proxyTable config:
proxyTable: {
‘/api’: {
target: ‘https://dev.greeninvoice.co.il/api/v1’,
changeOrigin: true,
pathRewrite: {
‘^/api’: ‘’
}
}
}and this is the request code:
return Vue.http.post('/api/account/login', payload).then((response) => { debugger return response.data })
getting: http://localhost:8080/api/account/login 500 (Internal Server Error)
-
Seems like discussion moved to Gitter. User error in this case.