-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Proxy not working #709
Comments
Have you restarted the development server after adding the proxy setting? |
@gaearon yes, i did. |
is there any way to checking proxy server? |
Can you publish both projects so I could take a look? Meaning both generated project and the server you are using. Also, can you reproduce this with https://github.com/fullstackreact/food-lookup-demo? |
I can not reproduce this problem with https://github.com/fullstackreact/food-lookup-demo. Here is my projects: Thanks. |
I restarted my computer, and it works fine now. Not sure what's happed. |
¯_(ツ)_/¯ |
Wow, this is interesting. Had the exact same problem and solved it by restarting a computer too. No idea what's going on here. |
Just some info for other people landing here: for me proxy works with a simple curl request, but not when opening the url in the browser. It's the Accept text/html header. |
@shime Could I restart your computer to solve my problem, thanks:) still struggling with this problem |
That does seem to be the problem indeed. Having the same issue. How did you solve this? |
restarted computer but still not working.. |
@rikkertkoppes I didn't solve it - I needed to expose a REST api and calls to those routes with fetch or curl work, the only inconvenient is not being able to open them in a browser window. |
same problem here |
According to this:
Just in case... |
For what it's worth, I was having the same issue and a restart did the trick for me as well. I did notice as my computer was shutting down, that I had still had my work server up and running on localhost:5000 (same port as my express app). I didn't get a chance to test if killing that would solve the issue without a restart but it's a possibility? |
Same situation...I restart my mac and it works...hahaha |
And one more happy computer restarter. |
wtf. why would restarting your computer work? can somebody get to the bottom of this? Is there some kind of caching that can help? |
Late to the party but I tried to restart servers along with the computer itself and the proxy still wasn't working (getting 404s). I just changed my server and proxy (package.json) port from 5000 to 6000, restarted the servers, and it started working. If restarts aren't working, try changing the port number. Still not sure of the root cause though... |
Expected behavior
fetch()
should work correctly.Actual behavior
I got 404 NOT FOUND.
Environment
create-react-app: v0.4.3
React-scripts: v0.4.3
Node: v4.4.7
npm: v3.8.3
Operating system:
Windows
The text was updated successfully, but these errors were encountered: