summaryrefslogtreecommitdiff
path: root/lib/web/middleware
diff options
context:
space:
mode:
authorSheogorath2018-06-24 13:59:18 +0200
committerSheogorath2018-06-24 14:05:41 +0200
commita762928e971d0a21799cd15818647518da36db93 (patch)
tree1e454924c3c44782cad72b759a28b59905359a67 /lib/web/middleware
parent23c33c0c046a9a27b2a31d334f6f818d8b1b3459 (diff)
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 <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/web/middleware')
-rw-r--r--lib/web/middleware/codiMDVersion.js10
1 files changed, 10 insertions, 0 deletions
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()
+}