Fix collaboration of Nextcloud integration

This commit is contained in:
Wolfgang Ginolas 2023-08-22 13:13:19 +02:00
parent 84e254d86e
commit 58331b067d

View File

@ -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);