Skip to main content
Version: Next

RouterOptions.staticFallbackHandler

Home > @backstage/plugin-app-backend > RouterOptions > staticFallbackHandler

A request handler to handle requests for static content that are not present in the app bundle.

This can be used to avoid issues with clients on older deployment versions trying to access lazy loaded content that is no longer present. Typically the requests would fall back to a long-term object store where all recently deployed versions of the app are present.

Another option is to provide a database that will take care of storing the static assets instead.

If both database and staticFallbackHandler are provided, the database will attempt to serve static assets first, and if they are not found, the staticFallbackHandler will be called.

Signature:

staticFallbackHandler?: express.Handler;