Update: Remove Origin
This commit is contained in:
parent
a330e71860
commit
b26c75f163
1 changed files with 4 additions and 3 deletions
|
|
@ -5,7 +5,8 @@ const allowList = [
|
|||
'http://127.0.0.1:4200',
|
||||
'http://127.0.0.1:4201',
|
||||
'https://admin-polynotfound.herokuapp.com',
|
||||
'https://polynotfound.herokuapp.com'
|
||||
'https://polynotfound.herokuapp.com',
|
||||
|
||||
];
|
||||
|
||||
const corsOptionsDelegate = function(req, callback) {
|
||||
|
|
@ -13,13 +14,13 @@ const corsOptionsDelegate = function(req, callback) {
|
|||
let corsOptions;
|
||||
if (allowList.indexOf(req.header('Origin')) !== -1) {
|
||||
corsOptions = {
|
||||
origin: true,
|
||||
origin: false,
|
||||
credentials: true
|
||||
}
|
||||
} else {
|
||||
corsOptions = {
|
||||
origin: false,
|
||||
credentials: false
|
||||
credentials: true
|
||||
}
|
||||
}
|
||||
console.log(corsOptions);
|
||||
|
|
|
|||
Reference in a new issue