fix: allow subdomains only for ddinstagram.com

This commit is contained in:
dumbmoron 2024-04-29 19:05:49 +00:00
parent e8d8a62dd1
commit ea5b703703
No known key found for this signature in database
2 changed files with 1 additions and 2 deletions

View File

@ -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",

View File

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