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

Function getContentSecurityPolicyMode

apps/web/src/lib/security-headers.ts:49–61  ·  view source on GitHub ↗
(
  env: Record<string, string | undefined> = process.env
)

Source from the content-addressed store, hash-verified

47 originFromUrl(env.NEXT_PUBLIC_SESSION_INGEST_WS_URL),
48 originFromUrl(sessionSyncUrl),
49 webSocketOriginFromUrl(sessionSyncUrl),
50 ]);
51}
52
53export function getContentSecurityPolicyMode(
54 env: Record<string, string | undefined> = process.env
55): ContentSecurityPolicyMode {
56 const configuredMode = env.CSP_MODE?.trim().toLowerCase();
57 if (
58 configuredMode === 'enforce' ||
59 configuredMode === 'off' ||
60 configuredMode === 'report-only'
61 ) {
62 return configuredMode;
63 }
64 return 'report-only';

Callers 2

baseProxyFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected