mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
🐛 Fix bug that page did load white after version update
This commit is contained in:
@@ -1129,8 +1129,19 @@ class App {
|
|||||||
|
|
||||||
|
|
||||||
// Serve the website
|
// Serve the website
|
||||||
|
const startTime = (new Date()).toUTCString();
|
||||||
const editorUiPath = require.resolve('n8n-editor-ui');
|
const editorUiPath = require.resolve('n8n-editor-ui');
|
||||||
this.app.use('/', express.static(pathJoin(pathDirname(editorUiPath), 'dist'), { index: 'index.html' }));
|
this.app.use('/', express.static(pathJoin(pathDirname(editorUiPath), 'dist'), {
|
||||||
|
index: 'index.html',
|
||||||
|
setHeaders: (res, path) => {
|
||||||
|
if (res.req && res.req.url === '/index.html') {
|
||||||
|
// Set last modified date manually to n8n start time so
|
||||||
|
// that it hopefully refreshes the page when a new version
|
||||||
|
// got used
|
||||||
|
res.setHeader('Last-Modified', startTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user