fix(rpc): render canonical csrf token for clients
Quality / quality (ubuntu-latest) (push) Failing after 9m46s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-12 18:20:14 +05:30
parent 0f201c9767
commit f73fbb7aba
4 changed files with 36 additions and 1 deletions
@@ -51,6 +51,7 @@ test("server actions validate, enforce CSRF, invalidate, and progressively enhan
const page = await handlers.fetch(new Request("https://example.test/users"), server);
const html = await page!.text();
expect(html).toContain('name="_csrf"');
expect(html).toContain('name="wrnexus-csrf"');
expect(html).toContain("/__wrnexus/actions.js");
const cookie = page!.headers.get("set-cookie")!;
const token = /wire-csrf=([^;]+)/.exec(cookie)?.[1];