mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 17:50:34 +08:00
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
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:
parent
e0871866ff
commit
b631279152
@ -24,6 +24,7 @@ function fastNormalizeDomainWithoutWwwNoIP(domain: string, parsed: TldTsParsed |
|
|||||||
|| parsed.subdomain === 'xml-v4'
|
|| parsed.subdomain === 'xml-v4'
|
||||||
|| parsed.subdomain === 'xml-eu'
|
|| parsed.subdomain === 'xml-eu'
|
||||||
|| parsed.subdomain === 'xml-eu-v4'
|
|| parsed.subdomain === 'xml-eu-v4'
|
||||||
|
|| (parsed.subdomain.length === 4 && parsed.subdomain.startsWith('www'))
|
||||||
) {
|
) {
|
||||||
return parsed.domain;
|
return parsed.domain;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -608,6 +608,7 @@ function onHostname(
|
|||||||
|| parsed.subdomain === 'xml-v4'
|
|| parsed.subdomain === 'xml-v4'
|
||||||
|| parsed.subdomain === 'xml-eu'
|
|| parsed.subdomain === 'xml-eu'
|
||||||
|| parsed.subdomain === 'xml-eu-v4'
|
|| parsed.subdomain === 'xml-eu-v4'
|
||||||
|
|| (parsed.subdomain.length === 4 && parsed.subdomain.startsWith('www'))
|
||||||
) {
|
) {
|
||||||
hostname = parsed.domain;
|
hostname = parsed.domain;
|
||||||
} else if (parsed.subdomain.startsWith('www.')) {
|
} else if (parsed.subdomain.startsWith('www.')) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user