From 251739fe1a670b5e0a69b5f392e80bfb21da24b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Sun, 16 Oct 2022 00:06:17 +0000 Subject: [PATCH] dnslink-ipfs: contentType guessing bugfix --- plugins/dnslink-ipfs/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dnslink-ipfs/index.js b/plugins/dnslink-ipfs/index.js index 61ddfba..95f8113 100644 --- a/plugins/dnslink-ipfs/index.js +++ b/plugins/dnslink-ipfs/index.js @@ -103,7 +103,7 @@ * TODO: this needs a fix */ var contentType = ''; - switch (dnslinkAddr.split('.', -1)[1].toLowerCase()) { + switch (dnslinkAddr.split('.').pop().toLowerCase()) { case 'html': case 'htm': contentType = 'text/html';