mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Updated token payload.
This commit is contained in:
parent
cd9036adaf
commit
1c64800157
2 changed files with 11 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue