Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { setServerTimingHeaders } from "./defaultHeaders";
|
||||
|
||||
describe("default route headers", () => {
|
||||
it("carries the request nonce and root CSP through nested route header functions", () => {
|
||||
const nonce = "aBcDeFgHiJkLmNoPqRsTuVwX";
|
||||
const policy = `default-src 'self'; script-src 'nonce-${nonce}'`;
|
||||
const headers = setServerTimingHeaders(new Headers(), {
|
||||
loaderHeaders: new Headers(),
|
||||
parentHeaders: new Headers({
|
||||
"x-hivegrid-csp-nonce": nonce,
|
||||
"Content-Security-Policy": policy,
|
||||
}),
|
||||
});
|
||||
|
||||
expect(headers.get("x-hivegrid-csp-nonce")).toBe(nonce);
|
||||
expect(headers.get("Content-Security-Policy")).toBe(policy);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user