class AddAssetsRevisionHeader implements MiddlewareInterface

Stamps every API response with the current asset revision token, so a browsing client can notice when the JS/CSS it booted with has been superseded and offer the user a reload — without polling or a forced refresh.

Constants

HEADER_NAME

Methods

__construct(AssetsRevision $revision)

No description

ResponseInterface
process(ServerRequestInterface $request, RequestHandlerInterface $handler)

No description

Details

__construct(AssetsRevision $revision)

Parameters

AssetsRevision $revision

ResponseInterface process(ServerRequestInterface $request, RequestHandlerInterface $handler)

Parameters

ServerRequestInterface $request
RequestHandlerInterface $handler

Return Value

ResponseInterface