🐛 Fix naming of events in AffinityTrigger Node
This commit is contained in:
@@ -204,6 +204,13 @@ const config = convict({
|
||||
},
|
||||
|
||||
// How n8n can be reached (Editor & REST-API)
|
||||
path: {
|
||||
format: String,
|
||||
default: '/',
|
||||
arg: 'path',
|
||||
env: 'N8N_PATH',
|
||||
doc: 'Path n8n is deployed to'
|
||||
},
|
||||
host: {
|
||||
format: String,
|
||||
default: 'localhost',
|
||||
|
||||
@@ -1693,9 +1693,21 @@ class App {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Read the index file and replace the path placeholder
|
||||
const editorUiPath = require.resolve('n8n-editor-ui');
|
||||
const filePath = pathJoin(pathDirname(editorUiPath), 'dist', 'index.html');
|
||||
let readIndexFile = readFileSync(filePath, 'utf8');
|
||||
const n8nPath = config.get('path');
|
||||
readIndexFile = readIndexFile.replace(/\/%BASE_PATH%\//g, n8nPath);
|
||||
|
||||
// Serve the altered index.html file separately
|
||||
this.app.get(`/index.html`, async (req: express.Request, res: express.Response) => {
|
||||
res.send(readIndexFile);
|
||||
});
|
||||
|
||||
// Serve the website
|
||||
const startTime = (new Date()).toUTCString();
|
||||
const editorUiPath = require.resolve('n8n-editor-ui');
|
||||
this.app.use('/', express.static(pathJoin(pathDirname(editorUiPath), 'dist'), {
|
||||
index: 'index.html',
|
||||
setHeaders: (res, path) => {
|
||||
|
||||
Reference in New Issue
Block a user