通过http-proxy-middleware转发socket.io失败
## 相关环境信息
- **操作系统**：Windows 10
- **Node 版本**：v12.19.0
- **Egg 版本**：v2.27.0
- **create-react-app**: v4.0.0
- **http-proxy-middleware**: v1.0.6
- **socket.io-client**: v2.3.1

### react client:
```js
import io from 'socket.io-client';
const socket = io({
  transports: ['websocket']
});
socket.on('connect', () => {
  console.log('socket.io client connected!');
});
```
### setupProxy.js
```js
const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = (app) => {
  app.use(
    '/socket.io',
    createProxyMiddleware({
      target: 'http://127.0.0.1:7001',
      changeOrigin: true,
      ws: true
    })
  );
};
```
客户端错误： WebSocket is closed before the connection is established.

如果将客户端代码直接连接egg则正常
```js
const socket = io('http://127.0.0.1:7001', {
  transports: ['websocket']
});
```