mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): App should not crash with a custom rest endpoint (#5911)
fixes #5880
This commit is contained in:
committed by
GitHub
parent
6689451e8c
commit
2881ee9ecc
@@ -144,6 +144,7 @@ export class Start extends BaseCommand {
|
||||
private async generateStaticAssets() {
|
||||
// Read the index file and replace the path placeholder
|
||||
const n8nPath = config.getEnv('path');
|
||||
const restEndpoint = config.getEnv('endpoints.rest');
|
||||
const hooksUrls = config.getEnv('externalFrontendHooksUrls');
|
||||
|
||||
let scriptsString = '';
|
||||
@@ -167,6 +168,7 @@ export class Start extends BaseCommand {
|
||||
];
|
||||
if (filePath.endsWith('index.html')) {
|
||||
streams.push(
|
||||
replaceStream('{{REST_ENDPOINT}}', restEndpoint, { ignoreCase: false }),
|
||||
replaceStream(closingTitleTag, closingTitleTag + scriptsString, {
|
||||
ignoreCase: false,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user