API proxy not working #12584
Replies: 2 comments 1 reply
-
|
According to what you described, the proxying is working. Making HTTP requests isn't related to Vue Router at all, so it's not like it needs to bypass it. Since you are getting 404, your request is hitting your API server. |
Beta Was this translation helpful? Give feedback.
-
|
I had the same problem on quasar, the reason was because pathRewrite didn't work, changed to rewrite and it was fine, the reason was not clear |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a Quasar app which needs to talk to an API backend. On my dev machine the Quasar app is on port 8081 and the API on port 8080. To avoid CORS etc. issues, I want to set up a proxy, so requests to localhost:8080/api are proxied to the back end. Following the instructions in the docs, I have the following block in quasar.conf.js:
But this is not working. Requests to 'localhost:8081/api/' are getting a 404 response from Express. Do I have to do something else, either in quasar.conf.js or in the router configuration, to ensure that '/api/...' requests bypass the router and are proxied instead to the back end?
Beta Was this translation helpful? Give feedback.
All reactions