title: Webpack-dev-server CORS error with credentials
body: <p>I'm getting CORS problems with hot module reloading - dev server. I'm using the dev-server on port <code>3000</code> but the application is served from another port <code>http://localhost:52024/</code>.</p>
  
  <p>This is the error I'm getting (Chrome, Windows 10):</p>
  
  <pre><code>GET http://localhost:3000//sockjs-node/info?t=1502216500095 404 (Not Found)
  XMLHttpRequest cannot load http://localhost:3000//sockjs-node/info?t=1502216500095. The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'http://localhost:52024' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
  [WDS] Disconnected!
  </code></pre>
  
  <p>Actually I'm getting two errors: the first is caused by the double slash <code>//</code> in the path, the other is the CORS-related error. This is my <code>webpack.config.js</code>:</p>
  
  <pre><code>const webpack = require('webpack'),
      path = require('path');
  
  module.exports = {
      entry: {
          'admin': ['webpack-dev-server/client?http://localhost:3000', 'webpack/hot/only-dev-server', './src/admin/index.js']
      },
      output: {
          path: path.join(__dirname, 'admin/dist'),
          filename: '[name].js',
          publicPath: 'http://localhost:3000'
      },
      module: {
          rules: [
              { test: /\.js$/, include: path.join(__dirname, 'src'), use: ['react-hot-loader/webpack', 'babel-loader'] },
              { test: /\.css/, use: ['style-loader', 'css-loader'] },
              { test: /\.less$/, use: ['style-loader', 'css-loader', 'less-loader'] },
              { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: ['url-loader?limit=10000&amp;mimetype=application/font-woff'] },
              { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, use: ['file-loader'] },
              { test: /\.(png|jpg)$/, use: ['url-loader?limit=8192'] }
          ]
      },
      plugins: [
          new webpack.HotModuleReplacementPlugin(),
      ],
      devtool: 'cheap-module-eval-source-map',
      devServer: {
          port: 3000,
          hot: true,
          inline: true,
          headers: {
              "Access-Control-Allow-Origin": "*"
          }
      }
  };
  </code></pre>
  
  <p>I'm starting webpack with:</p>
  
  <pre><code>webpack-dev-server --config webpack.config.js --progress
  </code></pre>
  
  <p>Any idea? I'm using <code>webpack 3.5.1</code> and <code>webpack-dev-server 2.7.1</code> Thank you.</p>