mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Ensure correct Cache-Control header on / as well (no-changelog) (#9983)
This commit is contained in:
committed by
GitHub
parent
7e972c78af
commit
c8ad7ccd72
@@ -335,6 +335,7 @@ export class Server extends AbstractServer {
|
|||||||
// Route all UI urls to index.html to support history-api
|
// Route all UI urls to index.html to support history-api
|
||||||
const nonUIRoutes: Readonly<string[]> = [
|
const nonUIRoutes: Readonly<string[]> = [
|
||||||
'assets',
|
'assets',
|
||||||
|
'static',
|
||||||
'types',
|
'types',
|
||||||
'healthz',
|
'healthz',
|
||||||
'metrics',
|
'metrics',
|
||||||
@@ -372,12 +373,12 @@ export class Server extends AbstractServer {
|
|||||||
|
|
||||||
this.app.use(
|
this.app.use(
|
||||||
'/',
|
'/',
|
||||||
|
historyApiHandler,
|
||||||
express.static(staticCacheDir, {
|
express.static(staticCacheDir, {
|
||||||
...cacheOptions,
|
...cacheOptions,
|
||||||
setHeaders: setCustomCacheHeader,
|
setHeaders: setCustomCacheHeader,
|
||||||
}),
|
}),
|
||||||
express.static(EDITOR_UI_DIST_DIR, cacheOptions),
|
express.static(EDITOR_UI_DIST_DIR, cacheOptions),
|
||||||
historyApiHandler,
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.app.use('/', express.static(staticCacheDir, cacheOptions));
|
this.app.use('/', express.static(staticCacheDir, cacheOptions));
|
||||||
|
|||||||
Reference in New Issue
Block a user