Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kodai305 opened this issue Jul 8, 2021 · 1 comment

Comments

@kodai305
Copy link

kodai305 commented Jul 8, 2021

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?

@lustremedia
Copy link

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

grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants