MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / getPolicyDirective

Function getPolicyDirective

apps/web/src/lib/security-headers.test.ts:8–10  ·  view source on GitHub ↗
(policy: string, directive: string)

Source from the content-addressed store, hash-verified

6} from '@/lib/security-headers';
7
8function getPolicyDirective(policy: string, directive: string): string {
9 return policy.split('; ').find(entry => entry.startsWith(`${directive} `)) ?? '';
10}
11
12describe('security headers', () => {
13 it('builds CSP with required third-party sources', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected