mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #470] [MERGED] fix: TPR zone resolution for multi-part TLD domains #596
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#596
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/470
Author: @NathanDrake2406
Created: 3/11/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:fix/tpr-domain-resolution📝 Commits (2)
d02db3bfix: TPR zone resolution for multi-part TLD domains5031a67chore: format test file📊 Changes
2 files changed (+105 additions, -44 deletions)
View changed files
📝
packages/vinext/src/cloudflare/tpr.ts(+41 -44)📝
tests/deploy.test.ts(+64 -0)📄 Description
Summary
MULTI_PART_TLDSlist inresolveZoneIdwith progressive domain candidate lookupshop.example.co.uk, triesco.uk→example.co.uk→shop.example.co.ukuntil a Cloudflare zone matches.org.au,.co.in,.gov.uk, etc.) without maintaining a TLD list.com,.io) still resolve on the first API call — no performance regressionnullon miss despite a TODO claiming fallback existedChanges
packages/vinext/src/cloudflare/tpr.ts: ExtractdomainCandidates()pure function, rewriteresolveZoneIdto loop over candidatestests/deploy.test.ts: Add 8 tests covering candidate generation and wrangler config domain extractionTest plan
domainCandidatesunit tests: bare domain, simple subdomain, multi-part TLD, deeply nestedparseWranglerConfigtests: routes string form, custom_domains array, workers.dev filtering, KV extraction🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.