umami/lib/security.js

9 lines
216 B
JavaScript
Raw Normal View History

2022-08-29 05:20:54 +02:00
import { getItem } from 'next-basics';
import { AUTH_TOKEN } from './constants';
export function getAuthHeader() {
const token = getItem(AUTH_TOKEN);
return token ? { authorization: `Bearer ${token}` } : {};
}