diff --git a/core/express.js b/core/express.js index 4244b36..cfd2e75 100644 --- a/core/express.js +++ b/core/express.js @@ -43,15 +43,20 @@ app.use(methodOverride()); app.use(helmet()); // enable CORS - Cross Origin Resource Sharing -var allowedOrigins = ['http://localhost:8080', 'http://127.0.0.1:8080', 'https://adminapp2.loquedeverdadimporta.org']; +var allowedOrigins = ['http://localhost:8080', 'http://127.0.0.1:8080', 'https://adminapp2.loquedeverdadimporta.org']; app.use(cors({ - origin: function (origin, callback) { // allow requests with no origin + origin: function (origin, callback) { + // allow requests with no origin // (like mobile apps or curl requests) + return callback(null, true); + if (!origin) { return callback(null, true); } + console.log('origin =>', origin); + if (allowedOrigins.indexOf(origin) === -1) { var msg = 'The CORS policy for this site does not ' + 'allow access from the specified Origin.'; diff --git a/helpers/providers.helper.js b/helpers/providers.helper.js index c5be219..3a5c4cb 100644 --- a/helpers/providers.helper.js +++ b/helpers/providers.helper.js @@ -43,7 +43,7 @@ function extractVimeoInformation(vimeoResponse) { link: vimeoResponse.link, type: vimeoResponse.type, stats: vimeoResponse.stats, - + files: vimeoResponse.files, download: vimeoResponse.download, pictures: vimeoResponse.pictures, embed: getIframeSource(vimeoResponse.embed.html)