Fix broken accessToken check

This commit is contained in:
Andris Reinman 2020-07-17 14:21:54 +03:00
parent 2ac49daaee
commit fdc9af2a89

5
api.js
View file

@ -175,6 +175,11 @@ server.use(
delete req.query.accessToken;
}
if (req.params.accessToken) {
// delete or it will conflict with Joi schemes
delete req.params.accessToken;
}
if (req.headers['x-access-token']) {
req.headers['x-access-token'] = '';
}