Skip to content

Commit 63750ff

Browse files
committed
Excluding the response header and fixing the missing json file case.
1 parent 8d74ffe commit 63750ff

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/well-known-headers.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"access-control",
1313
"access-control-request-headers",
1414
"access-control-request-method",
15-
"activate-storage-access",
1615
"alpn",
1716
"alt-used",
1817
"alternates",

tools/headers.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { execSync } from "node:child_process";
22
import { writeFile } from "node:fs/promises";
3+
import { tryCatch } from "ramda";
34
import { z } from "zod";
45

56
/**
@@ -48,6 +49,11 @@ const responseOnlyHeaders = {
4849
reason:
4950
"Specifies how long preflight results can be cached in CORS responses.",
5051
},
52+
"activate-storage-access": {
53+
reason: "response header",
54+
proof:
55+
"https://developers.google.com/privacy-sandbox/blog/storage-access-api-headers-logic",
56+
},
5157
age: {
5258
proof: "Defined in RFC 7234, Section 5.1.",
5359
reason:
@@ -194,11 +200,10 @@ const responseOnlyHeaders = {
194200

195201
const dest = "src/well-known-headers.json";
196202

197-
const mtime = new Date(
198-
execSync(`git log -1 --pretty="format:%ci" ${dest}`, {
199-
encoding: "utf8",
200-
}),
201-
);
203+
const mtime = tryCatch(
204+
(cmd) => new Date(execSync(cmd, { encoding: "utf8" })),
205+
() => undefined,
206+
)(`git log -1 --pretty="format:%ci" ${dest}`);
202207

203208
console.info("Current state", mtime);
204209

0 commit comments

Comments
 (0)