19 lines
575 B
TypeScript
Raw Normal View History

2023-05-19 15:22:48 -03:00
import express from "express";
import config from "@/config.json";
2023-05-19 15:22:48 -03:00
const cacheRouter = express.Router();
cacheRouter.get("/B.Cache.Dx11.bin.*", (_req, res) => {
res.sendFile("static/data/B.Cache.Dx11_33.0.6.bin", { root: "./" });
2023-05-19 15:22:48 -03:00
});
cacheRouter.get("/B.Cache.Windows_en.bin*", (_req, res) => {
res.sendFile("static/data/B.Cache.Windows_en_33.0.10.bin", { root: "./" });
2023-05-19 15:22:48 -03:00
});
cacheRouter.get(/^\/origin\/([a-zA-Z0-9]+)\/H\.Cache\.bin.*$/, (_req, res) => {
res.sendFile(`static/data/H.Cache_${config.version}.bin`, { root: "./" });
2023-05-19 15:22:48 -03:00
});
export { cacheRouter };