From a762928e971d0a21799cd15818647518da36db93 Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Sun, 24 Jun 2018 13:59:18 +0200 Subject: Do final internal renameing A little minor change, by moving the CodiMD version header in its own middleware. Should simplify to determine the version number of the Backend in future. Signed-off-by: Sheogorath --- lib/web/middleware/codiMDVersion.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lib/web/middleware/codiMDVersion.js (limited to 'lib/web/middleware') diff --git a/lib/web/middleware/codiMDVersion.js b/lib/web/middleware/codiMDVersion.js new file mode 100644 index 00000000..e7775876 --- /dev/null +++ b/lib/web/middleware/codiMDVersion.js @@ -0,0 +1,10 @@ +'use strict' + +const config = require('../../config') + +module.exports = function (req, res, next) { + res.set({ + 'CodiMD-Version': config.version + }) + return next() +} -- cgit v1.2.3