proxy-module
proxy-module copied to clipboard
Proxy settings do not work properly on the server (AWS) or in the yarn generated environment.
I have the following settings in nuxt.config.ts.
axios: {
proxy: true
},
proxy: {
'/api/': {
target: 'https://hoge.co.jp/v1/',
changeOrigin: true
},
}
Call the API in the following way.
await axios.get( '/api/xxx )
With such a configuration, I did yarn dev and it works fine on localhost.
However, when I deploy the yarn generate on AWS, it does not work properly.
Also, it doesn't work properly on local PC with yarn generate + yarn start.
Is there a problem with the configuration?
I believe this ticket should be closed! yarn generate does not work here as the README states ...
