chore: handle client requesting non-Lotus assets (#934)
Some checks failed
Build Docker image / docker (push) Successful in 33s
Build / build (20) (push) Successful in 35s
Build / build (18) (push) Successful in 56s
Build / build (22) (push) Has been cancelled

Reviewed-on: #934
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
This commit is contained in:
Sainan 2025-02-09 09:39:52 -08:00 committed by OrdisPrime
parent 7863833850
commit a03c987f69

View File

@ -12,7 +12,7 @@ cacheRouter.get(/^\/origin\/[a-zA-Z0-9]+\/[0-9]+\/H\.Cache\.bin.*$/, (req, res)
}
});
cacheRouter.get(/^\/0\/Lotus\/.+!.+$/, async (req, res) => {
cacheRouter.get(/^\/0\/.+!.+$/, async (req, res) => {
try {
const dir = req.path.substr(0, req.path.lastIndexOf("/"));
const file = req.path.substr(dir.length + 1);