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

Proxy requests do not work when not connected to internet #744

Closed
jsgoupil opened this issue Jan 16, 2017 · 8 comments
Closed

Proxy requests do not work when not connected to internet #744

jsgoupil opened this issue Jan 16, 2017 · 8 comments
Labels

Comments

@jsgoupil
Copy link

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
[HPM] Error occurred while trying to proxy request /api/errors from localhost:3000 to http://localhost:55323 (ENOENT) (https://nodejs.org/api/errors.html#errors_common_system_errors)

If the current behavior is a bug, please provide the steps to reproduce.
Turn of your WIFI or unplug your network cable

What is the expected behavior?
Proxy requests, especially if they are on localhost...

Please mention your webpack and Operating System version.
2.1.0-beta.12
Windows 10

@jsgoupil jsgoupil changed the title Proxy requests does not work when not connected to internet Proxy requests do not work when not connected to internet Jan 16, 2017
@xxn520
Copy link

xxn520 commented Jan 21, 2017

same issue

@SpaceK33z
Copy link
Member

SpaceK33z commented Jan 21, 2017

I tried reproducing your issue by proxying to a server on localhost, but it worked fine for me when offline. Could you provide more information? Note that we use http-proxy-middleware for proxying, so if there is an issue, it's probably over there.

@afucher
Copy link

afucher commented Feb 6, 2017

same issue.. I'm trying to search more useful information to put here... But I don't find anything that could be help

@nassimus26
Copy link

same issue ...!!

@chimurai
Copy link
Contributor

Similar discussion @ facebook/create-react-app#1116

On Windows you have to use 127.0.01 instead of localhost to be able to work offline.

@liyu2012
Copy link

liyu2012 commented May 1, 2017

the same issue with me!,I find in the http-proxy-middleware,there is a error.
in function getProxyEventHandler()
_.get will return undefined instead of a Function type.
But it need a function to listen proxyEvents

@lucasvinals
Copy link

Guys, I think "localhost" is resolved with an active connection to the router. Try to replace localhost to 0.0.0.0 in your proxy object like this:
proxy: { '/api': { target: { host: '0.0.0.0', port: 3000, }, secure: false, }, },

@shellscape
Copy link
Contributor

Pruning due to age, inactivity, and apparent solutions/workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants