Files
prowler/ui/components/runtime-config/runtime-public-config.tsx
Pablo Fernandez Guerra (PFE) 853610bbbf feat(ui): resolve public SaaS config at container runtime (#11500)
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 15:12:18 +02:00

18 lines
620 B
TypeScript

import { getRuntimePublicConfig } from "@/lib/runtime-config";
import { RUNTIME_CONFIG_SCRIPT_ID } from "@/lib/runtime-config.shared";
import { serializeForScript } from "@/lib/safe-json";
// Inert JSON config island (type="application/json") rendered in <head> before
// the client bundle, so module-load consumers (Sentry init) read it race-free.
export async function RuntimePublicConfig() {
const config = await getRuntimePublicConfig();
return (
<script
id={RUNTIME_CONFIG_SCRIPT_ID}
type="application/json"
dangerouslySetInnerHTML={{ __html: serializeForScript(config) }}
/>
);
}