diff options
| author | Christoph (Sheogorath) Kern | 2018-06-26 21:38:02 +0200 | 
|---|---|---|
| committer | GitHub | 2018-06-26 21:38:02 +0200 | 
| commit | 6634fac84964d4f292599a9f368c182e6f10045c (patch) | |
| tree | d93e6a6574ad972a27b372fc12e0539b57ca8868 /lib/web | |
| parent | d87505d5836ea1bad60c0e2c2a8aa25b9b4e1590 (diff) | |
| parent | 2184491f4ac4b224e26fcc4b54d792dd4e82178f (diff) | |
Merge pull request #850 from SISheogorath/rebrand/CodiMD
Rebrand HackMD CE to CodiMD
Diffstat (limited to '')
| -rw-r--r-- | lib/web/middleware/codiMDVersion.js | 10 | ||||
| -rw-r--r-- | lib/web/statusRouter.js | 6 | 
2 files changed, 12 insertions, 4 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() +} diff --git a/lib/web/statusRouter.js b/lib/web/statusRouter.js index 4495a28e..256fead0 100644 --- a/lib/web/statusRouter.js +++ b/lib/web/statusRouter.js @@ -17,8 +17,7 @@ statusRouter.get('/status', function (req, res, next) {    realtime.getStatus(function (data) {      res.set({        'Cache-Control': 'private', // only cache by client -      'X-Robots-Tag': 'noindex, nofollow', // prevent crawling -      'HackMD-Version': config.version +      'X-Robots-Tag': 'noindex, nofollow' // prevent crawling      })      res.send(data)    }) @@ -102,8 +101,7 @@ statusRouter.get('/config', function (req, res) {    }    res.set({      'Cache-Control': 'private', // only cache by client -    'X-Robots-Tag': 'noindex, nofollow', // prevent crawling -    'HackMD-Version': config.version +    'X-Robots-Tag': 'noindex, nofollow' // prevent crawling    })    res.render(config.constantsPath, data)  }) | 
