Merge branch 'master' of wopr.rodax-software.com:lqdvi/app2-api
This commit is contained in:
commit
d96fd80921
@ -43,15 +43,20 @@ app.use(methodOverride());
|
|||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
|
||||||
// enable CORS - Cross Origin Resource Sharing
|
// 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({
|
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)
|
// (like mobile apps or curl requests)
|
||||||
|
return callback(null, true);
|
||||||
|
|
||||||
if (!origin) {
|
if (!origin) {
|
||||||
return callback(null, true);
|
return callback(null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('origin =>', origin);
|
||||||
|
|
||||||
if (allowedOrigins.indexOf(origin) === -1) {
|
if (allowedOrigins.indexOf(origin) === -1) {
|
||||||
var msg = 'The CORS policy for this site does not ' +
|
var msg = 'The CORS policy for this site does not ' +
|
||||||
'allow access from the specified Origin.';
|
'allow access from the specified Origin.';
|
||||||
|
|||||||
@ -43,7 +43,7 @@ function extractVimeoInformation(vimeoResponse) {
|
|||||||
link: vimeoResponse.link,
|
link: vimeoResponse.link,
|
||||||
type: vimeoResponse.type,
|
type: vimeoResponse.type,
|
||||||
stats: vimeoResponse.stats,
|
stats: vimeoResponse.stats,
|
||||||
|
files: vimeoResponse.files,
|
||||||
download: vimeoResponse.download,
|
download: vimeoResponse.download,
|
||||||
pictures: vimeoResponse.pictures,
|
pictures: vimeoResponse.pictures,
|
||||||
embed: getIframeSource(vimeoResponse.embed.html)
|
embed: getIframeSource(vimeoResponse.embed.html)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user