title: webpack-dev-server sock-js wrong url
body: <p>I'm having an issue where my webpack-dev-server instance is listening on a different url to my web server. The web server is on <a href="http://dev.foo.com/" rel="nofollow noreferrer">http://dev.foo.com/</a> whereas webpack is listening on localhost:8080. I'm including the built <code>app.bundle.js</code> in the <code>&lt;head&gt;</code> tag on my web server.</p>
  
  <p>The issue is that webpack is trying to connect to <code>http://dev.foo.com:8080/sockjs-node/info?t=1507075303656</code> and is receiving <code>net::ERR_CONNECTION_REFUSED</code> rather than connection to <code>http://localhost:8080/sockjs-...</code></p>
  
  <p>I can't for the life of me figure out if it's possible to change this url, most answers seem to suggest that I need to change the <code>entry: ['webpack-dev-server/client']</code> but that doesn't seem to work for me.</p>
  
  <p>Here's my webpack config.</p>
  
  <pre class="lang-js prettyprint-override"><code>// webpack.common.js
  const path = require('path');
  
  module.exports = {
      entry: ['./js/application.js'],
      output: {
          path: path.resolve(__dirname, './build'),
          filename: 'app.bundle.js'
      },
      module: {
          rules: [
              { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ },
              { test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ }
          ]
      }
  }
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// webpack.dev.js
  const merge = require('webpack-merge');
  const common = require('./webpack.common.js');
  
  module.exports = merge(common, {
      entry: ['webpack-dev-server/client?http://127.0.0.1:8080/'],
      module: {
          rules: [
              {
                  test: /\.scss$/,
                  use: [
                      { loader: "style-loader" },
                      { loader: "css-loader" },
                      { loader: "sass-loader" }
                  ]
              },
              { test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'file-loader?name=http://localhost:8080/fonts/[name].[ext]' }
          ]
      },
      devServer: {
          hot: true,
          headers: {
              "Access-Control-Allow-Origin": "*",
              "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
              "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
          }
      }
  });
  </code></pre>