Skip to content

Commit

Permalink
🐛 Fixed ipv6 check properly (#232)
Browse files Browse the repository at this point in the history
It appears your rewrite caused this feature to not work.

See our comment here <#231 (comment)>.
  • Loading branch information
titanism authored Dec 13, 2023
1 parent 1999eda commit 3cc3be2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,13 @@ export const update = async (shouldCommit = false) => {
if (isIP(url)) {
if (site.ipv6 && !isIPv6(url))
throw new Error("Site URL must be IPv6 for ipv6 check");
else if (site.ipv6)
} else {
if (site.ipv6)
address = (await dns.promises.resolve6(url))[0];
else
address = (await dns.promises.resolve4(url))[0];

if (isIP(url) && !isIP(address))
if (!isIP(address))
throw new Error("Site IP address could not be resolved");
}

Expand Down

0 comments on commit 3cc3be2

Please sign in to comment.