From ea5b7037039f54ff836d1bad22a686be243fb537 Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Mon, 29 Apr 2024 19:05:49 +0000 Subject: [PATCH] fix: allow subdomains only for ddinstagram.com --- src/modules/processing/servicesConfig.json | 1 - src/modules/processing/url.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/processing/servicesConfig.json b/src/modules/processing/servicesConfig.json index cada27f3..4d61f7be 100644 --- a/src/modules/processing/servicesConfig.json +++ b/src/modules/processing/servicesConfig.json @@ -79,7 +79,6 @@ }, "instagram": { "alias": "instagram reels, posts & stories", - "subdomains": ["d", "g"], "altDomains": ["ddinstagram.com"], "patterns": [ "reels/:postId", ":username/reel/:postId", "reel/:postId", "p/:postId", ":username/p/:postId", diff --git a/src/modules/processing/url.js b/src/modules/processing/url.js index 7e08712b..c723cb91 100644 --- a/src/modules/processing/url.js +++ b/src/modules/processing/url.js @@ -66,7 +66,7 @@ export function aliasURL(url) { } break; case "ddinstagram": - if (services.instagram.altDomains.includes(host.domain) && (host.subdomain === null || services.instagram.subdomains.includes(host.subdomain))) { + if (services.instagram.altDomains.includes(host.domain) && [null, 'd', 'g'].includes(host.subdomain)) { url.hostname = 'instagram.com'; } break;