coolify/resources/js/v5/lib/csrf.ts
Andras Bacsai 790bd2e28c refactor(v5): migrate frontend from JSX to TypeScript
Convert all v5 JS/JSX source files to TS/TSX, add tsconfig.json,
install typescript and @types/react* dev deps, add typecheck npm
script, create types.ts with shared prop types, and update Tailwind
CSS source glob and shadcn components.json to include TS extensions.
2026-06-16 20:15:36 +02:00

3 lines
133 B
TypeScript

export function csrfToken(): string {
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') ?? '';
}