This function applies a middleware to a response object to update its headers.
Primarily used for applying helmet headers to a response object.
Supports the express middleware signature to allow for easy integration with the existing helmet middleware.
// When using together with an ApiGatewayProxyHandler, you can apply the middleware to the handler effect: consthandlerEffect: HandlerEffect = Effect.succeed({ statusCode:200, body:'Woohoo', }); exportconsthandler = handlerEffect.pipe( Effect.map(applyMiddleware(middleware)), RestApi.toLambdaHandler,
This function applies a middleware to a response object to update its headers.
Primarily used for applying helmet headers to a response object. Supports the express middleware signature to allow for easy integration with the existing helmet middleware.
Example