ах да забыл упомянуть я пробовал уже
domain:".localhost",
domain:"*.localhost",
domain:"sub.localhost",
domain:"*" и многое другое так же я добавил в config angular
$httpProvider.defaults.withCredentials = true;, и пробовал добавлять
app.use(function(req, res, next){
// Website you wish to allow to connect
res.setHeader('Access-Control-Allow-Origin', req.headers.host)
// Request methods you wish to allow
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
// Request headers you wish to allow
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
// Set to true if you need the website to include cookies in the requests sent
// to the API (e.g. in case you use sessions)
res.setHeader('Access-Control-Allow-Credentials', true);
next();
});
в server.js