mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
fix(core): Ensure correct Cache-Control
header on /
as well (no-changelog) (#9983)
This commit is contained in:
parent
7e972c78af
commit
c8ad7ccd72
|
@ -335,6 +335,7 @@ export class Server extends AbstractServer {
|
|||
// Route all UI urls to index.html to support history-api
|
||||
const nonUIRoutes: Readonly<string[]> = [
|
||||
'assets',
|
||||
'static',
|
||||
'types',
|
||||
'healthz',
|
||||
'metrics',
|
||||
|
@ -372,12 +373,12 @@ export class Server extends AbstractServer {
|
|||
|
||||
this.app.use(
|
||||
'/',
|
||||
historyApiHandler,
|
||||
express.static(staticCacheDir, {
|
||||
...cacheOptions,
|
||||
setHeaders: setCustomCacheHeader,
|
||||
}),
|
||||
express.static(EDITOR_UI_DIST_DIR, cacheOptions),
|
||||
historyApiHandler,
|
||||
);
|
||||
} else {
|
||||
this.app.use('/', express.static(staticCacheDir, cacheOptions));
|
||||
|
|
Loading…
Reference in a new issue