title: ReactJs always showing "content-type" is not allowed by access-Control-Allow-Headers
body: <p>I am trying to send https request from ReactJs to NodeJs using axios. but i always getting the error <code>Access to XMLHttpRequest at 'https://sadsadsadsa.com/get-data' from origin 'https://sdadsads432a.com' has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.</code></p>
  <p>My NodeJs :</p>
  <pre><code>const express = require('express')
  const app = express()
  const port = 3000
  let bodyParser = require('body-parser')
  let cors = require('cors')
  
  app.options('*', cors({ allowedHeaders: true, optionsSuccessStatus: 200, preflightContinue: true, origin: '*' }))
  
  app.post('/get-data', (req, res) =&gt; {
      res.setHeader(&quot;Access-Control-Allow-Origin&quot;, &quot;*&quot;);
      res.setHeader(&quot;Access-Control-Allow-Headers&quot;, &quot;*&quot;);
      res.setHeader(&quot;Access-Control-Allow-Methods&quot;, 'OPTIONS,POST,GET')
      res.setHeader(&quot;Content-Type&quot;, &quot;application/json&quot;)
  
      if (req.body.access_key == '#3zF932988011ec3c1x8F@11ec3c1x8f') {
          res.json({ token: 'Token' })
      }
  })
  
  app.listen(port, () =&gt; {
      console.log(`Example app listening on port ${port}`)
  })
  </code></pre>
  <p>ReactJs :</p>
  <pre><code>axios.post('https://sadsadsadsa.com/get-data',{ api, 'access_key': '#3zF932988011ec3c1x8F@11ec3c1x8f' },{}).then((res) =&gt; {
      mobileToken = res.data.token
      resolve('done')
  })
  </code></pre>
  <p>How can i overcome this issue.</p>