How can make addresses defined in proxy of nuxt.config available in static generated files?

54 Views Asked by At

My nuxt.config of nuxt.js 2 of my project is defined as follows:

export default {

ssr:true,
target:'server',
  router:{
    base:'/',
    middleware:['auth']
  },

...

   generate:{
     dir:'docker/dist',
     fallback:true

  },

  proxy:{
     '/realm/custom-graph/': {
      target:
        process.env.NODE_ENV && process.env.NODE_ENV !== 'production'
          ? <IP_ADDRESS>
          : <IP_ADDRESS>,
      pathRewrite: { '^/realm/custom-graph/': '' },
    },
  
  }

}

also, i generate the static folder by following code: npm run generate

And after, by running command :python3 -m http.server 8007, I expected to see the built page correctly, But, some of files are not found and the following error appears:

GET http://0.0.0.0:8007/realm/main/profile/token/ 404 (File not found)
0

There are 0 best solutions below