fix(core): Remove inline JS from FE for more secure CSP (#17195)

This commit is contained in:
Iván Ovejero
2025-07-15 11:00:00 +02:00
committed by GitHub
parent 61e2e34caa
commit fc3129e378
3 changed files with 20 additions and 23 deletions

View File

@@ -13,6 +13,8 @@ import replaceStream from 'replacestream';
import { pipeline } from 'stream/promises';
import { z } from 'zod';
import { BaseCommand } from './base-command';
import { ActiveExecutions } from '@/active-executions';
import { ActiveWorkflowManager } from '@/active-workflow-manager';
import config from '@/config';
@@ -32,8 +34,6 @@ import { UrlService } from '@/services/url.service';
import { WaitTracker } from '@/wait-tracker';
import { WorkflowRunner } from '@/workflow-runner';
import { BaseCommand } from './base-command';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const open = require('open');
@@ -164,9 +164,8 @@ export class Start extends BaseCommand<z.infer<typeof flagsSchema>> {
}
};
await compileFile('index.html');
const files = await glob('**/*.{css,js}', { cwd: EDITOR_UI_DIST_DIR });
await Promise.all(files.map(compileFile));
await Promise.all([compileFile('index.html'), ...files.map(compileFile)]);
}
async init() {