diff --git a/lib/http-worker.js b/lib/http-worker.js index 147a7d841..3b98a4422 100644 --- a/lib/http-worker.js +++ b/lib/http-worker.js @@ -272,9 +272,18 @@ app.get(mainPagePattern, Express.static('./customize.dist')); app.use("/blob", Express.static(Path.resolve(Env.paths.blob), { maxAge: Env.DEV_MODE? "0d": "365d" })); -app.head("/datastore", Express.static(Env.paths.data, { - maxAge: "0d" -})); +app.use("/datastore", + (req, res, next) => { + if (req.method === 'HEAD') { + next(); + } else { + res.status(403).end(); + } + }, + Express.static(Env.paths.data, { + maxAge: "0d" + } +)); app.use('/block/', function (req, res, next) { var parsed = Path.parse(req.url);