title: proxy not serving for get request : http-proxy-middleware
body: <p>I am using http-proxy-middleware for reverse proxying the application in order to avoid CORS during development. </p>
  
  <p>Following is the setup for http-proxy-middleware that is being used. I am getting the response for each method except <strong>GET</strong>.</p>
  
  <p>Setup : </p>
  
  <p>Path: <strong>server/index.js</strong> </p>
  
  <pre><code>import express from 'express';
  import path from 'path';
  import webpack from 'webpack';
  import webpackMiddleware from 'webpack-dev-middleware';
  import webpackHotMiddleware from 'webpack-hot-middleware';
  import webpackConfig from '../webpack.config.dev';
  let proxy = require('http-proxy-middleware');
  let app = express();
  const compiler = webpack(webpackConfig);
  app.use(webpackMiddleware(compiler, {
  hot: true,
  noInfo: true
  }));
  app.use(webpackHotMiddleware(compiler));
  app.get('/*', (req, res) =&gt; {
  res.sendFile(path.join(__dirname, './index.html'));
  });
  let options = {
  target: 'https://example.com',
  changeOrigin: true,
  logLevel:'debug',
  ws: true,
  onProxyReq: function(proxyReq, req, res) {        
      //  log the req
      console.log('RAW REQUEST from the target', JSON.stringify(req.headers, true, 2));
  },
  onProxyRes: function (proxyRes, req, res) {
  
      //  log the response
      console.log('RAW Response from the target', JSON.stringify(proxyRes.headers, true, 2));
  }
  };
  app.use(['/front_end_api/**'], proxy(options));
  app.listen(3000, () =&gt; console.log('Running on localhost'));
  </code></pre>
  
  <p><strong>Please let me know if I am doing anything wrong here.</strong> </p>