fix(rpc): render canonical csrf token for clients
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user