diff options
-rw-r--r-- | lib/response.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/response.js b/lib/response.js index 488cf864..4e5fac3b 100644 --- a/lib/response.js +++ b/lib/response.js @@ -334,7 +334,8 @@ function actionDownload(req, res, noteId) { 'Content-Type': 'text/markdown; charset=UTF-8', 'Cache-Control': 'private', 'Content-disposition': 'attachment; filename=' + filename + '.md', - 'Content-Length': body.length + 'Content-Length': body.length, + 'X-Robots-Tag': 'noindex, nofollow' // prevent crawling }); res.end(body); }); @@ -367,6 +368,7 @@ function actionPDF(req, res, noteId) { res.setHeader('Content-disposition', 'attachment; filename="' + filename + '.pdf"'); res.setHeader('Cache-Control', 'private'); res.setHeader('Content-Type', 'application/pdf; charset=UTF-8'); + res.setHeader('X-Robots-Tag', 'noindex, nofollow'); // prevent crawling stream.pipe(res); fs.unlink(path); }); |