You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
That does seem to be the problem indeed. Having the same issue. How did you solve this?
@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.
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?
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...
Activity
gaearon commentedon Sep 23, 2016
Have you restarted the development server after adding the proxy setting?
ShinyChang commentedon Sep 23, 2016
@gaearon yes, i did.
ShinyChang commentedon Sep 23, 2016
is there any way to checking proxy server?
gaearon commentedon Sep 23, 2016
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?
ShinyChang commentedon Sep 23, 2016
I can not reproduce this problem with https://github.com/fullstackreact/food-lookup-demo.
Here is my projects:
https://github.com/ShinyChang/family
https://github.com/ShinyChang/family-backend
Thanks.
gaearon commentedon Sep 23, 2016
Can’t reproduce this on OS X so far:
I’ll give Windows a try later today.
ShinyChang commentedon Sep 23, 2016
I restarted my computer, and it works fine now. Not sure what's happed.
gaearon commentedon Sep 23, 2016
¯_(ツ)_/¯
shime commentedon Aug 31, 2017
Wow, this is interesting. Had the exact same problem and solved it by restarting a computer too. No idea what's going on here.
nickredmark commentedon Oct 11, 2017
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.
PhilTheAir commentedon Dec 18, 2017
@shime Could I restart your computer to solve my problem, thanks:) still struggling with this problem
rikkertkoppes commentedon Dec 26, 2017
@nmaro
That does seem to be the problem indeed. Having the same issue. How did you solve this?
amritms commentedon Dec 29, 2017
restarted computer but still not working..
nickredmark commentedon Dec 30, 2017
@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.
superjose commentedon Feb 11, 2018
According to this:
Just in case...
Sandersd commentedon Feb 13, 2018
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?
miaojiuchen commentedon Mar 27, 2018
Same situation...I restart my mac and it works...hahaha
henrisokka commentedon Apr 21, 2018
And one more happy computer restarter.
ELI7VH commentedon Apr 27, 2018
wtf. why would restarting your computer work? can somebody get to the bottom of this? Is there some kind of caching that can help?
vinaysangawar commentedon Sep 13, 2018
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...