dnslink-ipfs: contentType guessing bugfix

merge-requests/15/head
Michał 'rysiek' Woźniak 2022-10-16 00:06:17 +00:00
rodzic 3b25ce6145
commit 251739fe1a
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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';