From 48be9bddba1a7c372f7cddd2d4968113f196f627 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Wed, 24 Aug 2022 14:09:24 +0200 Subject: Dont even bother loading mappings for assets. --- src/api/middlewares/TestClient.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/api/middlewares/TestClient.ts') diff --git a/src/api/middlewares/TestClient.ts b/src/api/middlewares/TestClient.ts index 2784c8ab..2c195994 100644 --- a/src/api/middlewares/TestClient.ts +++ b/src/api/middlewares/TestClient.ts @@ -45,6 +45,9 @@ export default function TestClient(app: Application) { res.set(name, value); }); } else { + if(req.params.file.endsWith(".map")) { + return res.status(404).send("Not found"); + } console.log(`[TestClient] Downloading file not yet cached! Asset file: ${req.params.file}`); response = await fetch(`https://discord.com/assets/${req.params.file}`, { agent, -- cgit 1.4.1