title: How to resolve invalid host header issue in webpack?
body: <p>I'm getting invalid host header error, if i access my page through browser with online ip. Locally it is working perfectly, but i don't know why this error is coming in live server. I'm following three steps to run my react js application, that is,
  'npm install'
  'npm run build'
  'npm run serve'</p>
  
  <p><strong>webpack config file host setup</strong></p>
  
  <p>// replace localhost with 0.0.0.0 if you want to access
  // your app from wifi or a virtual machine</p>
  
  <pre><code>const host = process.env.HOST || '0.0.0.0';
  const port = process.env.PORT || 3000;
  
  const stats = {
    hash: false,
    version: false,
    timings: false,
    assets: false,
    chunks: false,
    modules: false,
    reasons: false,
    children: false,
    source: false,
    errors: false,
    errorDetails: false,
    warnings: false,
    publicPath: false,
    colors: {
      green: '\u001b[32m',
    },
  };
  </code></pre>
  
  <p><strong>package.json scripts</strong></p>
  
  <pre><code>"build": "rimraf build &amp;&amp; cross-env NODE_ENV=production webpack --env.prod=true --env.sw=true",
      "serve": "pushstate-server build/ 3000",
  </code></pre>