Proxy module for axios not working

hamid-r-shakibi
0
hamid-r-shakibi
commented 5 months ago

Version

v5.6.0

Reproduction link

https://codesandbox.io/embed/codesandbox-nuxt-xflhs?fontsize=14

Steps to reproduce

When I use a proxy for Axios and set prefix, it works fine with auth module ( local strategy) but when I use Axios directly in pages ( in here placed in index.vue in mounted function ) I got an error:
GET http://localhost:3000/api/packs/ 404 (not found)
Nuxt is lunched in port 3000 and backend for API is on port 1200
axios config that is used when sending request :
{
.
.
.
url: "/papi/api/packs"
.
.
.
}

What is expected ?

GET http://localhost:1200/api/packs/ 200 (Ok)

What is actually happening?

GET http://localhost:3000/api/packs/ 404 (not found)

what am I doing wrong?

bug
0
Informations
Bug Report โ€ข Open
#c295 - Created 5 months ago