-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
bypass is handling all requests regardless proxy options #829
Comments
Your first proposal does make sense, but I'd prefer to not copy such a file in our repo. Of course we could also directly require that file, but that can be tricky. Another way could perhaps be to make an issue/PR to http-proxy-middleware, to add such an option in there. Not sure if that makes sense, but could be interesting to see how he thinks about it. |
Going to assert the suggestion to make this feature request with |
@shellscape, is this fixed or should I use |
webpack-dev-server
is very helpful in my development. Thanks!Currently, There is
bypass
in aproxy
option. Butbypass
is applied all requests regardless of its a pass.For instance, a server with the following
webpack.config.js
always returnsapi.json
as a response (It depends on order ofObject.keys
).I think the behavior is a little confusing.
Proposals
bypass
is applied when a proxy has matchedTo do that, we need to take a matching logic from
http-proxy-middleware
.But I think it's the best way to solve this problem.
Move
bypass
option to outsideproxy
optionsmoving
bypass
options to outsideproxy
asproxyBypass
is a clear way to tell developersproxyBypass
is applied all requests regardless of proxy options.But it seems to need to change
webpack.config.js
, which is painful for users.Add a validation for multiple
bypass
optionsThis doesn't change the current behaviors. Users can notice it might not work well when they put multiple
bypass
options in proxy optionsWhat do you think about this? I'd like to work on this.
Thanks.
The text was updated successfully, but these errors were encountered: