Enhance Reject Hosts Subsomain Stripping
Some checks failed
Build / Build (push) Has been cancelled
Build / Diff output (push) Has been cancelled
Build / Deploy to Cloudflare Pages (3.114.12) (push) Has been cancelled
Build / Deploy to GitHub and GitLab (push) Has been cancelled
Build / Remove Artifacts after Deployment (push) Has been cancelled

This commit is contained in:
SukkaW 2025-12-10 13:51:55 +08:00
parent e0871866ff
commit b631279152
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ function fastNormalizeDomainWithoutWwwNoIP(domain: string, parsed: TldTsParsed |
|| parsed.subdomain === 'xml-v4'
|| parsed.subdomain === 'xml-eu'
|| parsed.subdomain === 'xml-eu-v4'
|| (parsed.subdomain.length === 4 && parsed.subdomain.startsWith('www'))
) {
return parsed.domain;
}

View File

@ -608,6 +608,7 @@ function onHostname(
|| parsed.subdomain === 'xml-v4'
|| parsed.subdomain === 'xml-eu'
|| parsed.subdomain === 'xml-eu-v4'
|| (parsed.subdomain.length === 4 && parsed.subdomain.startsWith('www'))
) {
hostname = parsed.domain;
} else if (parsed.subdomain.startsWith('www.')) {