mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(core): Inline config.js to index.html to prevent CF from caching it (#18945)
This commit is contained in:
@@ -126,11 +126,9 @@ const plugins: UserConfig['plugins'] = [
|
||||
{
|
||||
name: 'Insert config script',
|
||||
transformIndexHtml: (html, ctx) => {
|
||||
const replacement = ctx.server
|
||||
? '' // Skip when using Vite dev server
|
||||
: '<script src="/{{BASE_PATH}}/{{REST_ENDPOINT}}/config.js"></script>';
|
||||
|
||||
return html.replace('%CONFIG_SCRIPT%', replacement);
|
||||
// Skip config script when using Vite dev server. Otherwise the BE
|
||||
// will replace it with the actual config script in cli/src/commands/start.ts.
|
||||
return ctx.server ? html.replace('%CONFIG_SCRIPT%', '') : html;
|
||||
},
|
||||
},
|
||||
// For sanitize-html
|
||||
|
||||
Reference in New Issue
Block a user