title: Preflight failing while adding Authorization header - React + Nodejs
body: <p>I am trying to communicate with the nodejs server , "Preflight" getting failed while adding Authorization header , with out header i am able to connect with server. Screen shot for request header from browser development tool is added below </p>
  
  <h1>CORS added to the server.js</h1>
  
  <pre><code>app.use(function(req, res, next) {
      res.header("Access-Control-Allow-Origin", "*");
      res.header("Access-Control-Allow-Headers", "Content-Type,Authorization");
      res.header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
      next();
  });
  </code></pre>
  
  <h1>React JS - Axios Code</h1>
  
  <pre><code>let params = {
        "userId": userName,
        "password": password,
        "random": event.target.name,
        "grant_type": "password"
      };
      var config = {
        headers: {
          'Authorization': 'Basic YXBwbGljYXRpb246c2VjcmV0',
          'Content-Type': 'application/x-www-form-urlencoded'
        }
      }
  
  
  [Axios.post('/oauth/token', params, config).then((response) =&gt; {
  
        if (response.status === 200) {
          if (response.data.querySuccess) {
            console.log(response);
      }
      ).catch((error) =&gt; {
        console.log(error);
        alert.error('Oops some error occured please check the data you have submitted');
      });
    }][1]
  </code></pre>