Skip to main content

MiddlewareFactory

Home > @backstage/backend-app-api > MiddlewareFactory

A utility to configure common middleware.

Signature:

class MiddlewareFactory 

Methods

MethodModifiersDescription
compression()Returns the compression middleware.
cors()Returns a middleware that implements the cors library.
create(options)staticCreates a new MiddlewareFactory.
error(options)Express middleware to handle errors during request processing.
helmet()Returns a middleware that implements the helmet library.
logging()Returns a request logging middleware.
notFound()Returns a middleware that unconditionally produces a 404 error response.