From dbe86258d762d7c890a83ccdeb506e9269bd0ea6 Mon Sep 17 00:00:00 2001 From: teddit Date: Sun, 21 Mar 2021 18:32:13 +0100 Subject: [PATCH] ignore urls starting with /r/ --- inc/commons.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/commons.js b/inc/commons.js index a16b292..5d7d637 100644 --- a/inc/commons.js +++ b/inc/commons.js @@ -181,6 +181,9 @@ module.exports = function(request, fs) { } this.isGif = (url) => { + if(url.startsWith('/r/')) + return false + try { url = new URL(url) let pathname = url.pathname