We are using webpack-dev-server with http-proxy-middleware. Our Protractor test cases keep timing out. I suspect we need to have keep-alive set to true, but I don't see such an option either in webpack-dev-server nor in http-proxy-middleware. Is it possible to configure keep-alive for wepack-dev-server?
Thanks
Yes, You can configure keep-alive in headers options like below. Use devServer.proxy.headers option.
devServer: {
publicPath: '...',
contentBase: '...',
port: 9090,
proxy: {
'/**': {
target: 'http://localhost:8080/',
secure: false,
changeOrigin: true,
headers: {
Connection: 'keep-alive'
}
}
},
open: true,
inline: true,
hot: false
}
use Connection: 'Keep-alive'
, Make sure the first letter 'C' captialized, not the connection: 'keep-alive'
whick ruined my whole day.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With