Proxy bypass not working in 1.15.0
See original GitHub issueA webpack.config.js like this (mostly pulled from the docs)
var path = require("path");
module.exports = {
entry: {
app: ["./app/main.js"]
},
output: {
path: path.resolve(__dirname, "build"),
publicPath: "/assets/",
filename: "bundle.js"
},
devServer: {
proxy: {
'/': {
bypass: function(){
return '/test.html';
}
}
}
}
};
works fine with webpack-dev-server@1.14.1, but after updating to 1.15.0, I get
$ node_modules/.bin/webpack-dev-server --content-base build/
/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/node_modules/http-proxy-middleware/lib/config-factory.js:42
throw new Error('[HPM] Missing "target" option. Example: {target: "http://www.example.org"}');
^
Error: [HPM] Missing "target" option. Example: {target: "http://www.example.org"}
at Object.createConfig (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/node_modules/http-proxy-middleware/lib/config-factory.js:42:15)
at new HttpProxyMiddleware (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/node_modules/http-proxy-middleware/lib/index.js:16:45)
at module.exports (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/node_modules/http-proxy-middleware/index.js:4:12)
at /Users/claytonwatts/dev/test/node_modules/webpack-dev-server/lib/Server.js:184:9
at Array.forEach (native)
at Object.Server.features.proxy (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/lib/Server.js:171:19)
at Server.<anonymous> (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/lib/Server.js:274:20)
at Array.forEach (native)
at new Server (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/lib/Server.js:273:40)
at Object.<anonymous> (/Users/claytonwatts/dev/test/node_modules/webpack-dev-server/bin/webpack-dev-server.js:183:1)
Looks like this is the commit that adds http-proxy-middleware.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Remove matched `/api` path in Webpack proxy - Stack Overflow
I've added the rewrite to the docs. As bypass already passes the response as an argument to the registered handler, I'm unsure how...
Read more >Bypass proxy and local intranet site exception not working
Hi, We have a locally hosted website in our organisation which loads when the proxy option in IE is unticked. When the proxy...
Read more >BrowserType.LaunchOptions.Proxy (Playwright - javadoc.io
Short form myproxy.com:3128 is considered an HTTP proxy. bypass. public String bypass. Optional coma-separated domains to bypass proxy, for example ".com, ...
Read more >App Mesh connectivity troubleshooting - AWS Documentation
This topic details common issues that you may experience with App Mesh connectivity. Unable to resolve DNS name for a virtual service. Symptoms....
Read more >View Client 3.1 Proxy Bypass not working
I've installed my view 3.1 test lab. I've got a problem. The proxy bypass is not working. I've settings in the IE properties...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Would it be possible to make a release now, just for this, since it’s a P0? A lot of my team members keep hitting this issue and wasting time debugging until they find this ticket.
This has been released as part of
1.15.1.