CSRF implementation on server helpers

This commit is contained in:
Oliver Bryan
2026-01-09 05:34:48 +00:00
parent f7d4d6212d
commit e074500a77
13 changed files with 66 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
import type { UserRecord } from "@issue/shared";
import { getAuthHeaders, getServerURL } from "@/lib/utils";
import { getServerURL } from "@/lib/utils";
import type { ServerQueryInput } from "..";
export async function byUsername({
@@ -13,7 +13,7 @@ export async function byUsername({
url.searchParams.set("username", username);
const res = await fetch(url.toString(), {
headers: getAuthHeaders(),
credentials: "include",
});
if (!res.ok) {