CORS
This commit is contained in:
parent
c00006bca9
commit
2c5e4ae452
@ -43,9 +43,15 @@ 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'];
|
||||||
|
|
||||||
|
// enable CORS - Cross Origin Resource Sharing
|
||||||
app.use(cors({
|
app.use(cors({
|
||||||
|
exposedHeaders: ['Content-Disposition', 'Content-Type', 'Content-Length'],
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
|
/*app.use(cors({
|
||||||
origin: function (origin, callback) {
|
origin: function (origin, callback) {
|
||||||
// allow requests with no origin
|
// allow requests with no origin
|
||||||
// (like mobile apps or curl requests)
|
// (like mobile apps or curl requests)
|
||||||
@ -65,7 +71,7 @@ app.use(cors({
|
|||||||
|
|
||||||
return callback(null, true);
|
return callback(null, true);
|
||||||
}
|
}
|
||||||
}));
|
}));*/
|
||||||
|
|
||||||
|
|
||||||
/*app.use(cors({
|
/*app.use(cors({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user