MCPcopy Index your code
hub / github.com/anomalyco/opencode / csp

Function csp

packages/opencode/src/server/shared/ui.ts:11–12  ·  view source on GitHub ↗
(hash = "")

Source from the content-addressed store, hash-verified

9export const UI_UPSTREAM = new URL("https://app.opencode.ai")
10
11export const csp = (hash = "") =>
12 `default-src 'self'; script-src 'self' 'wasm-unsafe-eval'${hash ? ` 'sha256-${hash}'` : ""}; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; media-src 'self' data:; connect-src * data:`
13export const DEFAULT_CSP = csp()
14
15export function themePreloadHash(body: string) {

Callers 3

ui.tsFile · 0.85
cspForHtmlFunction · 0.85
serveUIEffectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected