Updated token payload.
This commit is contained in:
@@ -7,9 +7,11 @@ import { secret } from 'lib/crypto';
|
||||
const log = debug('umami:auth');
|
||||
|
||||
export function getAuthToken(req) {
|
||||
const token = req.headers.authorization;
|
||||
|
||||
return token.split(' ')[1];
|
||||
try {
|
||||
return req.headers.authorization.split(' ')[1];
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export function parseAuthToken(req) {
|
||||
|
||||
Reference in New Issue
Block a user