diff --git a/lib/pubsuffix-psl.js b/lib/pubsuffix-psl.js index bf416511..83398555 100644 --- a/lib/pubsuffix-psl.js +++ b/lib/pubsuffix-psl.js @@ -60,7 +60,7 @@ function getPublicSuffix(domain, options = {}) { if (!ignoreError && SPECIAL_USE_DOMAINS.includes(topLevelDomain)) { if (allowSpecialUseDomain) { - return ""; + return topLevelDomain; } throw new Error( `Cookie has domain set to the public suffix "${topLevelDomain}" which is a special use domain. To allow this, configure your CookieJar with {allowSpecialUseDomain:true, rejectPublicSuffixes: false}.`