Created by
honestbaldwin 0 about 11 days ago

Keep Nuxt.js proxy settings also for production deployment (vue.js)?

I have a vue.js nuxt.js app (using ssr) with the following proxy setting:

axios: {
  proxy: true,
  proxyHeaders: true,
  prefix: '/api/v1/',
  progress: false
proxy: {
  '/api/v1/': 'https://mydomain.com'

Because of this when developing the frontend the actual deployed API can be developed against without running into TLS certificate problems aslocally the frontend is accessed in the browser under http://localhost:3333.

Is it ok to deploy the frontend with these proxy settings or should the proxy settings be removed since in the productive environment the frontend and api are behind a loadbalancer anyway and /v1/api requests do not reach the frontend servers. Is there any disadvantage in keeping these proxy settings for prod deployments?

See task infos