Fix csv download not being blocked

This commit is contained in:
Ajay 2022-11-07 16:30:16 -05:00
parent dc8c35695d
commit ee436d982c

View file

@ -210,7 +210,7 @@ function setupRoutes(router: Router) {
if (config.postgres?.enabled) {
router.get("/database", (req, res) => dumpDatabase(req, res, true));
router.get("/database.json", (req, res) => dumpDatabase(req, res, false));
router.get("/database/*", downloadFile);
router.get("/database/*", (req, res) => res.status(404).send("CSV downloads disabled. Please use sb-mirror rsync"));
router.use("/download", (req, res) => res.status(404).send("CSV downloads disabled. Please use sb-mirror rsync"));
} else {
router.get("/database.db", function (req: Request, res: Response) {