title: Sails.js Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response
body: <p>I'm creating a single page application using sails.js and reactjs and using JWT as authentication for protected requests. during the login process login request works as expected and able to login successfully. After that when I'm trying to request other requests with bearer token, browser shows following error message.</p>
  
  <blockquote>
    <p>Access to XMLHttpRequest at '<a href="http://localhost:1337/monitoringurl" rel="nofollow noreferrer">http://localhost:1337/monitoringurl</a>' from origin >'<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>' has been blocked by CORS policy: Request header field >authorization is not allowed by Access-Control-Allow-Headers in preflight >response.</p>
  </blockquote>
  
  <p>Below is my cors settings in sails config/security.js:</p>
  
  <blockquote>
    <p>cors: {
       allRoutes: true,
       allowOrigins: ["<a href="http://localhost:3000" rel="nofollow noreferrer">http://localhost:3000</a>"],
       allowCredentials: true,
    }</p>
  </blockquote>