title: Socket io v3 connection has been blocked by CORS policy
body: <p>I have cors error while using Socketio v3
  the app is on React backed by Nodejs</p>
  <h1>Server Side Codes:</h1>
  <pre><code>var server = http.createServer(app);
  var port = process.env.PORT || '3000'
  const io = require(&quot;socket.io&quot;)(server,{
  cors: {
    origin: &quot;*:*&quot;,
    methods: [&quot;PUT&quot;, &quot;GET&quot;, &quot;POST&quot;, &quot;DELETE&quot;, &quot;OPTIONS&quot;],
    allowedHeaders:[&quot;secretHeader&quot;],
    credentials: true
  }
  })
  </code></pre>
  <h1>Client Side Connecting code:</h1>
  <pre><code>const SOCKET_URL = &quot;https://fakeurl.org&quot;;
  socket.current = io(`${SOCKET_URL}`,{
        secretHeader:{
          &quot;Access-Control-Allow-Headers&quot;: &quot;*&quot;
        }
      });
  </code></pre>
  <p><em><strong>And i got the following error:</strong></em></p>
  <blockquote>
  <p>Access to XMLHttpRequest at
  'https://fakeurl.org/socket.io/?EIO=4&amp;transport=polling&amp;t=NOdqBkN'
  from origin 'http://localhost:3000' has been blocked by CORS policy:
  No 'Access-Control-Allow-Origin' header is present on the requested
  resource.</p>
  </blockquote>