From afaf48404aaa938955c8c4f42931c368c6f17007 Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Tue, 1 Oct 2019 15:26:44 +0200 Subject: [PATCH] bugfix: broken post stamp links --- deploy/datasets/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy/datasets/index.js b/deploy/datasets/index.js index d600e2706..88a71f09e 100644 --- a/deploy/datasets/index.js +++ b/deploy/datasets/index.js @@ -129,6 +129,12 @@ fs.readdir(RECEPTOR_PATH, (err, files) => { datasetsRouter.get('/previewFile', cacheMaxAge24Hr, (req, res) => { const { file } = req.query const filePath = previewFileMap.get(file) + + // even though req.url is modified, req.query is not + // for now, just serve non encoded image + + res.removeHeader('Content-Encoding') + if (filePath) { fs.createReadStream(filePath).pipe(res) } else { -- GitLab