[Vuejs]-Vue Nuxt Axios: cross-domain POST w/ proxy

1👍

Almost there…

On dev mode I could achieve the desired result with the following setup:

  axios: {
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
    },
  },

  proxy: {
    '/zapier/': {
      target: 'https://hooks.zapier.com/',
      pathRewrite: { '^/zapier/': '' },
      changeOrigin: true,
    },
  },

But proxy does not work on static sites 😪

Leave a comment