Request header field Content-Type is not allowed by Access-Control-Allow-Headers

If you got this CORS issue in node.js and express you need to add this to do the following:

  1. Install cors module
npm install cors --save
  1. Add cors in your app.js
var express = require('express')
  , cors = require('cors')
  , app = express();

app.use(cors());

Read more at https://github.com/expressjs/cors