Added refresh tokens

This commit is contained in:
Johnathon Slightham
2021-06-11 12:03:50 -04:00
parent fdb447a9ee
commit 531a4d632b
6 changed files with 51 additions and 3 deletions

View File

@@ -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());