lemmy-ui/src/server/utils/has-jwt-cookie.ts
Alec Armbruster 7743fa98b9
wip
2023-06-30 10:04:01 -04:00

6 lines
201 B
TypeScript

import * as cookie from "cookie";
import type { Request } from "express";
export function hasJwtCookie(req: Request): boolean {
return Boolean(cookie.parse(req.headers.cookie ?? "").jwt?.length);
}