hedgedoc/lib/web/middleware/codiMDVersion.ts
David Mehren e5961336b7
Add middleware/index.ts and remove default exports
Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:13 +02:00

9 lines
257 B
TypeScript

import { config } from '../../config'
import { NextFunction, Request, Response } from 'express'
export function codiMDVersion (req: Request, res: Response, next: NextFunction): void {
res.set({
'CodiMD-Version': config.version
})
return next()
}