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:
@@ -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.
|
||||
@@ -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`.
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user