Added refresh tokens
This commit is contained in:
5
index.js
5
index.js
@@ -35,6 +35,11 @@ mongoose.connect(config.db.connection, { useNewUrlParser: true, useUnifiedTopolo
|
||||
app.use(cors());
|
||||
app.use(express.urlencoded({ extended: true }))
|
||||
app.use(express.json());
|
||||
app.use(function(req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "*"); // update to match the domain you will make the request from
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
next();
|
||||
});
|
||||
|
||||
// Sanitize data to prevent NoSQL injections
|
||||
app.use(mongoSanitize());
|
||||
|
||||
Reference in New Issue
Block a user