app-backend: changeset and API report for asset cache and header updates

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-12-29 17:02:26 +01:00
parent 729b188045
commit eb00e8af14
3 changed files with 14 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app-backend': patch
---
Updated the cache control headers for static assets to instruct clients to cache them for 14 days.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-app-backend': patch
---
Added a new asset cache that stores static assets from previous deployments in the database. This fixes an issue where users have old browser tabs open and try to lazy-load static assets that no longer exist in the latest version.
The asset cache is enabled by passing the `database` option to `createRouter`.
+2
View File
@@ -6,6 +6,7 @@
import { Config } from '@backstage/config';
import express from 'express';
import { Logger as Logger_2 } from 'winston';
import { PluginDatabaseManager } from '@backstage/backend-common';
// Warning: (ae-missing-release-tag) "createRouter" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -19,6 +20,7 @@ export interface RouterOptions {
appPackageName: string;
// (undocumented)
config: Config;
database?: PluginDatabaseManager;
disableConfigInjection?: boolean;
// (undocumented)
logger: Logger_2;