Api proxy doesn't seem to be working for me

0
closed
pea
pea
Posted 3 years ago

Api proxy doesn't seem to be working for me #56

Thanks for the repo, it's been a great help. The proxy that should route localhost:8080/api to localhost:8181 doesn't seem to be working though.

I think I've found the solution though based on this.

devServer: {
    historyApiFallback: true,
    proxy: {
      '/api/*': {
        target: 'http://localhost:8181',
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }