Added resend, fixed CSRF
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user