MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getAppConfigScript

Function getAppConfigScript

server/src/utils/html-config.ts:85–88  ·  view source on GitHub ↗
(user?: AppUser | null)

Source from the content-addressed store, hash-verified

83 * Generate the script tag to inject app config into HTML.
84 */
85export function getAppConfigScript(user?: AppUser | null): string {
86 const config = buildAppConfig(user);
87 return `<script>window.__APP_CONFIG__=${JSON.stringify(config)};</script>`;
88}
89
90/**
91 * Inline script that buffers errors before PostHog loads.

Callers 1

injectConfigIntoHtmlFunction · 0.70

Calls 1

buildAppConfigFunction · 0.70

Tested by

no test coverage detected