Added resend, fixed CSRF

This commit is contained in:
cdricms
2025-02-21 16:16:24 +01:00
parent dbddf12f25
commit de828d4c13
10 changed files with 86 additions and 76 deletions

View File

@@ -20,7 +20,7 @@ export default async function request<T>(
if (options.csrfToken) {
const res: ApiResponse<{ csrf: string }> = await (
await fetch(`${API_URL}/csrf-token`)
await fetch(`${API_URL}/csrf-token`, { credentials: "include" })
).json();
if (res.data) headers["X-CSRF-Token"] = res.data.csrf;
}