Skip to content
Snippets Groups Projects
Commit 7fba4cb3 authored by happycoloredbanana's avatar happycoloredbanana Committed by Eugen Rochko
Browse files

Allow access token in URI (#3208)

parent a4c75776
No related branches found
No related tags found
No related merge requests found
......@@ -199,8 +199,9 @@ if (cluster.isMaster) {
}
const authorization = req.get('Authorization');
const accessToken = req.query.access_token;
if (!authorization) {
if (!authorization && !accessToken) {
const err = new Error('Missing access token');
err.statusCode = 401;
......@@ -208,7 +209,7 @@ if (cluster.isMaster) {
return;
}
const token = authorization.replace(/^Bearer /, '');
const token = authorization ? authorization.replace(/^Bearer /, '') : accessToken;
accountFromToken(token, req, next);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment