mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 01:35:17 +01:00
9 lines
211 B
JavaScript
9 lines
211 B
JavaScript
import { parse } from 'cookie';
|
|
import { verifySecureToken } from './crypto';
|
|
|
|
export default async req => {
|
|
const token = parse(req.headers.cookie || '')['umami.auth'];
|
|
|
|
return verifySecureToken(token);
|
|
};
|