Skip to content

Commit e62d8c6

Browse files
committed
style(webapp): format the route image CSP audit
1 parent 60a9584 commit e62d8c6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

apps/webapp/test/routeCspImgSrc.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ const TEST_FILE = /\.(test|spec)\.[cm]?[jt]sx?$/;
1515
const CSP_HEADER_OWNER = "app/entry.server.tsx";
1616

1717
/** Sources that resolve inside the document itself, so they carry nothing outward. */
18-
const LOCAL_SOURCES = new Set(["'self'", "'none'", "data:", "blob:", "filesystem:", "mediastream:"]);
18+
const LOCAL_SOURCES = new Set([
19+
"'self'",
20+
"'none'",
21+
"data:",
22+
"blob:",
23+
"filesystem:",
24+
"mediastream:",
25+
]);
1926

2027
/**
2128
* Hosts that serve content any stranger can upload. Necessarily incomplete — the
@@ -68,7 +75,7 @@ function overBroadReason(source: string): string | undefined {
6875
}
6976

7077
/** Every over-broad image source in a policy string, as `directive source: reason`. */
71-
export function overBroadImageSources(policy: string): string[] {
78+
function overBroadImageSources(policy: string): string[] {
7279
const findings: string[] = [];
7380

7481
for (const segment of policy.split(";")) {

0 commit comments

Comments
 (0)