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

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

Closed
pea opened this issue Feb 25, 2018 · 0 comments
Closed

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

pea opened this issue Feb 25, 2018 · 0 comments

Comments

@pea
Copy link

pea commented Feb 25, 2018

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': ''
        }
      }
    }
  }
YAfullStack added a commit to YAfullStack/React-project that referenced this issue Dec 4, 2021
PrinceCharming0915 added a commit to PrinceCharming0915/react that referenced this issue Apr 14, 2022
sperez927 pushed a commit to sperez927/react-heroku-app that referenced this issue Nov 11, 2023
sperez927 added a commit to sperez927/react-heroku-app that referenced this issue Nov 30, 2023
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