Merge pull request #241 from matiu/fix/headers

remove duplicate headers definition
This commit is contained in:
Matias Alejo Garcia 2014-11-11 12:13:18 -03:00
commit 45d2c232e3
2 changed files with 2 additions and 7 deletions

View File

@ -36,11 +36,6 @@ module.exports = function(app, historicSync, peerSync) {
if (config.enableEmailstore) {
var allowCopayCrossDomain = function(req, res, next) {
res.header('Access-Control-Allow-Origin', '*');
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header('Access-Control-Allow-Headers', 'Content-Type,Authorization');
if ('OPTIONS' == req.method) {
res.send(200);
res.end();

View File

@ -6,8 +6,8 @@ module.exports = function(app) {
app.use(function(req, res, next) {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type');
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, DELETE');
res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,Content-Type,Authorization');
next();
});
};