Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -0,0 +1,29 @@
import { describe, expect, it, vi } from "vitest";
vi.mock("~/modules/booking/routes/PublicBooking.server", () => ({
publicBookingLoader: vi.fn(),
publicBookingAction: vi.fn(),
}));
vi.mock("~/modules/booking/components/PublicBookingRoute", () => ({ default: () => null }));
vi.mock("~/components/ui/errors/ServerError", () => ({ default: () => null }));
describe("booking embed CSP", () => {
it("keeps cross-origin framing while nonce-protecting document scripts", async () => {
const { headers } = await import("./b.$tenant.$slug.embed");
const nonce = "aBcDeFgHiJkLmNoPqRsTuVwX";
const responseHeaders = new Headers(
headers({
loaderHeaders: new Headers(),
parentHeaders: new Headers({ "x-hivegrid-csp-nonce": nonce }),
actionHeaders: new Headers(),
errorHeaders: undefined,
}),
);
const policy = responseHeaders.get("Content-Security-Policy") ?? "";
expect(policy).toContain(`script-src 'self' 'nonce-${nonce}' 'strict-dynamic'`);
expect(policy).toContain("frame-ancestors *");
expect(policy).toContain("object-src 'none'");
expect(policy).toContain("form-action 'self'");
});
});