import type { OpenClawConfig } from "../config/types.openclaw.js" ;
export function collectCoreInsecureOrDangerousFlags(cfg: OpenClawConfig): string[] {
const enabledFlags: string[] = [];
if (cfg.gateway?.controlUi?.allowInsecureAuth === true ) {
enabledFlags.push("gateway.controlUi.allowInsecureAuth=true" );
}
if (cfg.gateway?.controlUi?.dangerouslyAllowHostHeaderOriginFallback === true ) {
enabledFlags.push("gateway.controlUi.dangerouslyAllowHostHeaderOriginFallback=true" );
}
if (cfg.gateway?.controlUi?.dangerouslyDisableDeviceAuth === true ) {
enabledFlags.push("gateway.controlUi.dangerouslyDisableDeviceAuth=true" );
}
if (cfg.hooks?.gmail?.allowUnsafeExternalContent === true ) {
enabledFlags.push("hooks.gmail.allowUnsafeExternalContent=true" );
}
if (Array.isArray(cfg.hooks?.mappings)) {
for (const [index, mapping] of cfg.hooks.mappings.entries()) {
if (mapping?.allowUnsafeExternalContent === true ) {
enabledFlags.push(`hooks.mappings[${index}].allowUnsafeExternalContent=true `);
}
}
}
if (cfg.tools?.exec?.applyPatch?.workspaceOnly === false ) {
enabledFlags.push("tools.exec.applyPatch.workspaceOnly=false" );
}
return enabledFlags;
}
Messung V0.5 in Prozent C=100 H=97 G=98
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-06-10)
¤
*© Formatika GbR, Deutschland