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