Update: Move Cors to Routes
This commit is contained in:
parent
3db7bfd7af
commit
c6e02cf797
3 changed files with 20 additions and 21 deletions
|
|
@ -5,8 +5,7 @@ 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) {
|
||||
|
|
@ -14,7 +13,7 @@ const corsOptionsDelegate = function(req, callback) {
|
|||
let corsOptions;
|
||||
if (allowList.indexOf(req.header('Origin')) !== -1) {
|
||||
corsOptions = {
|
||||
origin: false,
|
||||
origin: true,
|
||||
credentials: true
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Reference in a new issue