Skip to content

fix(core): keep same-domain filtering after an off-domain redirect - #3923

Merged
B4nan merged 1 commit into
masterfrom
claude/issue-3921-validation-826949
Jul 29, 2026
Merged

fix(core): keep same-domain filtering after an off-domain redirect#3923
B4nan merged 1 commit into
masterfrom
claude/issue-3921-validation-826949

Conversation

@B4nan

@B4nan B4nan commented Jul 28, 2026

Copy link
Copy Markdown
Member

When a request redirects to a different registrable domain, resolveBaseUrlForEnqueueLinksFiltering returned undefined for the same-domain strategy. The old comment claimed this makes enqueueLinks enqueue nothing, but the opposite happens: with no base URL the strategy patterns are never built, and an empty pattern list means "no filtering" downstream. The domain filter disappeared and every link on the page got enqueued, third party ones included — and from there the crawl kept expanding on the new domain.

Falling back to the original request origin keeps the filter in place, which is also what the same-hostname and same-origin branches already do.

Closes #3921

When a request redirected to a different registrable domain,
`resolveBaseUrlForEnqueueLinksFiltering` returned `undefined` for the
`same-domain` strategy. With no base URL, no strategy patterns are built,
and an empty pattern list means "no filtering" downstream - so instead of
enqueueing nothing, every link on the page was enqueued, third party ones
included. Falling back to the original request origin keeps the domain
filter in place.

Closes #3921
@B4nan B4nan added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jul 28, 2026
@github-actions github-actions Bot added this to the 146th sprint - Tooling team milestone Jul 28, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Jul 28, 2026
@B4nan
B4nan merged commit 9b312ef into master Jul 29, 2026
8 checks passed
@B4nan
B4nan deleted the claude/issue-3921-validation-826949 branch July 29, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

same-domain strategy stops filtering after a cross-domain redirect

3 participants