Skip to content

Commit

Permalink
Merge pull request #940 from hemildesai/webpack-connection-fix
Browse files Browse the repository at this point in the history
Fix intermittent connection issues between web and api in devServer
  • Loading branch information
peterp authored Aug 10, 2020
2 parents 577ba6e + 431b32a commit e40ffe1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/core/config/webpack.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ const baseConfig = merge(webpackConfig('development'), {
port: redwoodConfig.web.port,
proxy: {
[redwoodConfig.web.apiProxyPath]: {
target: `http://localhost:${redwoodConfig.api.port}`,
target: `http://[::1]:${redwoodConfig.api.port}`,
pathRewrite: {
[`^${escapeRegExp(redwoodConfig.web.apiProxyPath)}`]: '',
},
headers: {
Connection: 'keep-alive',
},
},
},
inline: true,
Expand Down

0 comments on commit e40ffe1

Please sign in to comment.