umami/lib/security.js
2022-08-28 20:20:54 -07:00

9 lines
216 B
JavaScript

import { getItem } from 'next-basics';
import { AUTH_TOKEN } from './constants';
export function getAuthHeader() {
const token = getItem(AUTH_TOKEN);
return token ? { authorization: `Bearer ${token}` } : {};
}