title: Cors nginx and nodejs
body: <p>I am using ReactJS on client side and NODEJS on the backend and nginx as a reverse proxy.
  My nginx file looks like this.</p>
  
  <pre><code>server{
              listen 80;
              server_name www.trusting.com;
              location / {
  
                      proxy_set_header 'Access-Control-Allow-Origin' 'http://localhost:3000';
                      proxy_set_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
                      proxy_set_header 'Access-Control-Allow-Headers' 'X-Requested-With,Accept,Content-Type, Origin';
  
                      proxy_pass http://localhost:8080;
                      proxy_http_version 1.1;
                      proxy_set_header Upgrade $http_upgrade;
                      proxy_set_header Connection 'upgrade';
                      proxy_set_header Host $host;
                      proxy_cache_bypass $http_upgrade;
  
  
  
  
  
          }
  
  
      }
  </code></pre>
  
  <p>Even thought the CORS is enabled on nginx i get error on ReactJS side when making REST calls.</p>
  
  <pre><code>Failed to load http://www.trusting.com/hey/signup: Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
  </code></pre>