title: Vuejs app showing Invalid host header error loop
body: <p>I was running a vuejs app on its own dev server, now I can access the site by public IP of machine, But after pointing it with a domain using nginx its showing an error loop in console</p>
  
  <p><a href="https://i.stack.imgur.com/nhI7m.png" rel="noreferrer">error in console</a></p>
  
  <p>Invalid Host header
  [WDS] Disconnected!</p>
  
  <p>Due to this the script,style injection and auto reload not working.</p>
  
  <p><strong><em>config of dev server</em></strong></p>
  
  <pre><code>dev: {
    assetsSubDirectory: "static",
    assetsPublicPath: "/",
    disableHostCheck: true,
    host: "0.0.0.0", // '192.168.2.39',//can be overwritten by 
    process.env.HOST
    port: 8080,
    autoOpenBrowser: false,
    errorOverlay: false,
    notifyOnErrors: false,
    poll: true, 
    devtool: "cheap-module-source-map",
    cacheBusting: true,
    cssSourceMap: true
  },
  </code></pre>
  
  <p><strong><em>nginx config for the domain</em></strong></p>
  
  <pre><code>server
  {
    listen 80 ;
    listen [::]:80;
    server_name prajin.prakash.com;
    location / {
          proxy_pass http://localhost:8081;
    }
  }
  </code></pre>