proxy-module icon indicating copy to clipboard operation
proxy-module copied to clipboard

Proxy settings do not work properly on the server (AWS) or in the yarn generated environment.

Open kodai305 opened this issue 4 years ago • 1 comments

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?

kodai305 avatar Jul 08 '21 23:07 kodai305

I believe this ticket should be closed! yarn generate does not work here as the README states ...

grafik

lustremedia avatar Nov 04 '21 12:11 lustremedia