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

Fix bypass proxy middleware #563

Merged
merged 2 commits into from
Aug 23, 2016
Merged

Fix bypass proxy middleware #563

merged 2 commits into from
Aug 23, 2016

Conversation

SpaceK33z
Copy link
Member

The bypass feature was no longer working because the code added the bypass method as middleware AND httpProxyMiddleware as middleware. However, if a bypass method is given, it should only use that as middleware.

This was caused in #359, and effects 1.15.0 and the 2.x branch.

For now, this is based on 1.15.0, because the people that reported issues with this are using that version. It should be merged to master too.

The `bypass` feature was no longer working because the code added the bypass method as middleware AND `httpProxyMiddleware` as middleware. However, if a `bypass` method is given, it should only use that as middleware.

This was caused in #359, and effects `1.15.0` and the 2.x branch.
@SpaceK33z SpaceK33z merged commit 97ef7b5 into webpack-1 Aug 23, 2016
@SpaceK33z
Copy link
Member Author

SpaceK33z commented Aug 23, 2016

Verified to work in #560 by @cletusw.

@SpaceK33z SpaceK33z deleted the fix-proxy-bypass branch August 23, 2016 21:56
SpaceK33z added a commit that referenced this pull request Aug 23, 2016
The `bypass` feature was no longer working because the code added the bypass method as middleware AND `httpProxyMiddleware` as middleware. However, if a `bypass` method is given, it should only use that as middleware.

This was caused in #359, and effects `1.15.0` and the 2.x branch.
@HZZformGD
Copy link

@SpaceK33z excuse me , can i ask u a question about webpack-dev-server, my English is not good, so hope you can know what i say, my problem is when i npm run dev , i got this error

D:\nodejs\vue+koa+MD\myblog\node_modules\http-proxy-middleware\lib\config-factory.js:42

        throw new Error('[HPM] Missing "target" option. Example: {target: "http://www.e
xample.org"}');

i google this, and found someone has this trouble , his trouble is similar to mine.
And then i follow the suggestion——copy the lib/server.js which is fixed ,and run again , unluckyly, i got the same error again , ps: i can run node app.js ,it works on chrome, it also works when i npm run build,

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

Successfully merging this pull request may close these issues.

2 participants