UNPKG

@dwp/govuk-casa

Version:

A framework for building GOVUK Collect-And-Submit-Applications

32 lines (31 loc) 893 B
/** * @typedef {object} StaticOptions Options to configure static router * @property {number} [maxAge=3600000] Cache TTL for all assets. Default is * `3600000` * @property {string} [cacheControl=private] Cache control headers. Default is * `private` */ /** * Create a router for serving CASA's static assets. * * @param {StaticOptions} options Options * @returns {MutableRouter} ExpressJS Router instance * @access private */ export default function staticRouter({ maxAge, cacheControl, }?: StaticOptions): MutableRouter; /** * Options to configure static router */ export type StaticOptions = { /** * Cache TTL for all assets. Default is * `3600000` */ maxAge?: number | undefined; /** * Cache control headers. Default is * `private` */ cacheControl?: string | undefined; }; import MutableRouter from "../lib/MutableRouter.js";