diff --git a/packages/react-dev-utils/WebpackDevServerUtils.js b/packages/react-dev-utils/WebpackDevServerUtils.js index d9eea34701c..034121beab5 100644 --- a/packages/react-dev-utils/WebpackDevServerUtils.js +++ b/packages/react-dev-utils/WebpackDevServerUtils.js @@ -367,8 +367,11 @@ function prepareProxy(proxy, appPublicFolder, servedPathname) { return ( req.method !== 'GET' || (mayProxy(pathname) && - req.headers.accept && - req.headers.accept.indexOf('text/html') === -1) + (!req.headers.accept || + (req.headers.accept && + req.headers.accept.indexOf('text/html') === -1) + ) + ) ); }, onProxyReq: proxyReq => {