Update: Cors
This commit is contained in:
parent
97b6039ce5
commit
6ce49daa9a
1 changed files with 7 additions and 1 deletions
|
|
@ -11,7 +11,13 @@ app.use(bodyParser.urlencoded({extended:true}));
|
|||
app.use(bodyParser.json());
|
||||
|
||||
const cors = require('cors');
|
||||
app.use(cors({origin: 'http://127.0.0.1:4200', credentials: true}));
|
||||
app.use(cors({
|
||||
origin: [
|
||||
'https://polynotfound.herokuapp.com/', 'http://127.0.0.1:4200',
|
||||
'https://admin-polynotfound.herokuapp.com/', 'http://127.0.0.1:4201'
|
||||
],
|
||||
credentials: true
|
||||
}));
|
||||
|
||||
const db = require("./models/mongodb.model");
|
||||
console.log("Db Url: ",db.url);
|
||||
|
|
|
|||
Reference in a new issue