diff options
author | Christoph (Sheogorath) Kern | 2018-06-24 01:58:08 +0200 |
---|---|---|
committer | GitHub | 2018-06-24 01:58:08 +0200 |
commit | b8726bbe8da69a8562df2fe82d70f8238aed542f (patch) | |
tree | 251bf368b6248c21ae1708d429847918f6173345 /lib/web | |
parent | cfdfafdb79a5b6f7d5b193b05aad1a16c1900f8f (diff) | |
parent | 0ed4b50098b4329b1d91e519bbbbe4e14701f92f (diff) |
Merge pull request #855 from hackmdio/fix/constants
Move config out of statics path
Diffstat (limited to '')
-rw-r--r-- | lib/web/statusRouter.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/web/statusRouter.js b/lib/web/statusRouter.js index d22fac47..4495a28e 100644 --- a/lib/web/statusRouter.js +++ b/lib/web/statusRouter.js @@ -90,3 +90,20 @@ statusRouter.post('/temp', urlencodedParser, function (req, res) { } } }) + +statusRouter.get('/config', function (req, res) { + var data = { + domain: config.domain, + urlpath: config.urlPath, + debug: config.debug, + version: config.version, + DROPBOX_APP_KEY: config.dropbox.appKey, + allowedUploadMimeTypes: config.allowedUploadMimeTypes + } + res.set({ + 'Cache-Control': 'private', // only cache by client + 'X-Robots-Tag': 'noindex, nofollow', // prevent crawling + 'HackMD-Version': config.version + }) + res.render(config.constantsPath, data) +}) |