mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 21:11:53 +00:00
853610bbbf
Co-authored-by: Pablo F.G <pablo.fernandez@prowler.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
620 B
TypeScript
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) }}
|
|
/>
|
|
);
|
|
}
|