refactor(core): Add env var to disable Python execution (#17414)

This commit is contained in:
Iván Ovejero
2025-07-17 15:10:52 +02:00
committed by GitHub
parent faa8935ccd
commit 5cc3b31b81
4 changed files with 25 additions and 6 deletions

View File

@@ -61,6 +61,10 @@ export class NodesConfig {
@Env('NODES_ERROR_TRIGGER_TYPE')
errorTriggerType: string = 'n8n-nodes-base.errorTrigger';
/** Whether to enable Python execution on the Code node. */
@Env('N8N_PYTHON_ENABLED')
pythonEnabled: boolean = true;
@Nested
communityPackages: CommunityPackagesConfig;
}

View File

@@ -48,6 +48,7 @@ export { DeploymentConfig } from './configs/deployment.config';
export { MfaConfig } from './configs/mfa.config';
export { HiringBannerConfig } from './configs/hiring-banner.config';
export { PersonalizationConfig } from './configs/personalization.config';
export { NodesConfig } from './configs/nodes.config';
const protocolSchema = z.enum(['http', 'https']);

View File

@@ -149,6 +149,7 @@ describe('GlobalConfig', () => {
errorTriggerType: 'n8n-nodes-base.errorTrigger',
include: [],
exclude: [],
pythonEnabled: true,
},
publicApi: {
disabled: false,