release: WRNexusJS 0.7.0

This commit is contained in:
2026-08-01 10:04:42 +05:30
parent c54144f2e4
commit 87507edf59
207 changed files with 12607 additions and 679 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ export class WrnServerCallError extends Error {
function csrfFromCookie(): string | undefined {
if (typeof document === "undefined") return undefined;
const raw = /(?:^|;\s*)wrnexus_csrf=([^;]+)/.exec(document.cookie)?.[1];
const raw = /(?:^|;\s*)wire-csrf=([^;]+)/.exec(document.cookie)?.[1];
return raw ? decodeURIComponent(raw) : undefined;
}
@@ -34,7 +34,7 @@ export async function callServerFunction<TInput extends unknown[], TOutput>(
signal: options.signal,
headers: {
"content-type": "application/json",
...(csrfToken ? { "x-wrnexus-csrf": csrfToken } : {}),
...(csrfToken ? { "x-csrf-token": csrfToken } : {}),
...options.headers,
},
body: JSON.stringify({ component, function: functionName, args }),