salesforce / tough-cookie

RFC6265 Cookies and CookieJar for Node.js
BSD 3-Clause "New" or "Revised" License
964 stars 207 forks source link

use `domainToASCII(str)` instead of `new URL(str).hostName` #433

Closed wjhsf closed 2 months ago

wjhsf commented 2 months ago

Today I learned that node has a utility, domainToASCII, that converts a domain name to ASCII. We can use that in canonicalDomain because we don't need to parse the full URL.