Answer the question
In order to leave comments, you need to log in
Why is Next JS not proxying api requests?
I am new to next js and I am facing the following issue:
In my next application I am using rewrites to bypass cors during api requests.
async rewrites() {
return [
{
source: '/api/:path*',
destination: 'http://localhost:82/api/:path*',
},
{
source: '/ua/api/:path*',
destination: 'http://localhost:82/ua/api/:path*',
},
]
},
/checkout/error
Request URL: http://localhost:3001/en/checkout/en/api/v2/pick-number/order/token/some-token
axios.get(`/en/api/pick-number/order/token/${token}`)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question