This package enables GOV UK LOGIN frontend Node.js applications to add one login common headers.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
The GDS One Login Common headers node package is a shared, reusable middleware function to add common headers to the request.
The purpose of this component is to make it as easy as possible for the various pods that make up the One Login journey to add common headers.
The package is owned by the DI Frontend Capability team, part of the development of this tool involves ongoing discovery with the pods responsible for maintaining the frontend repositories that make up the One Login journey. As more information is collated, the package and documentation will be updated. As such, it is considered a WIP and the pods will be notified when a stable release is ready.
-
Install NPM package
npm install one-login-common-headers
-
Import middleware function
const commonHeader = require("@govuk-one-login/one-login-common-headers");
-
Configure your node application's startup file (example: app.js or index.js) and add a new middleware functions to your router:
router.use(commonHeader.txmaAuditEncoded);