Repository navigation
Closed
Description
Observed
squirrel 0.0.138 (Overhub runner, Hetzner DE) audits https://www.alpensattel.de (Shopify, Markets with locale paths /de-ch, /fr-ch, /en). content/duplicate-description reports one English description on /de-ch, /fr-ch and /en. Live, /de-ch serves German (lang=de) and /fr-ch French.
pages rows in project.db for the crawl:
| url | final_url | request accept-language |
|---|---|---|
https://www.alpensattel.de/de-ch |
https://www.alpensattel.de/en |
en-US,en;q=0.9 |
https://www.alpensattel.de/fr-ch |
https://www.alpensattel.de/en |
en-US,en;q=0.9 |
Reproduction from the same host (plain curl, same UA):
accept-language: en-US,en;q=0.9 /de-ch -> https://www.alpensattel.de/en
accept-language: de-DE /de-ch -> https://www.alpensattel.de/
no accept-language /de-ch -> https://www.alpensattel.de/de-ch (German)
Expected
- The crawler fetches pages the way search engines do: Googlebot sends no
Accept-Language, so locale redirects keyed on it do not fire. A fixeden-USdefault makes every locale path of a shop with language redirection collapse into/en. - When
final_urldiffers fromurl(redirect to another page), content rules (duplicate-description, duplicate-title, …) evaluate the final URL once, not the requested URL as a separate page with the target's content.
Proposal
- Drop the default
Accept-Languageheader (or make it configurable to "none");[crawler] headerscan only override it with another value. - Dedupe pages by
final_urlbefore content duplicate rules, or attribute redirected content to the final URL.
Acceptance Criteria
- A default crawl sends no
Accept-Languageheader (the crawler fetches the way a search-engine bot does), so locale redirects keyed on that header do not fire; a regression test asserts the request headers -
[crawler] headerscan still set an explicitAccept-Language, and the docs say what the default is and how to set one - When a page's
final_urldiffers from itsurl, content duplicate rules (duplicate-description, duplicate-title) evaluate the final URL once; the requested URL is not counted as a separate page carrying the target's content - A fixture with
/de-chand/fr-chredirecting to/enonly whenAccept-Languageis present audits as three distinct pages with no duplicate-description finding, and/de-chredirecting to/enregardless is reported once - Cloud rendering (browser) requests keep working with no default
Accept-Language, and any change in behaviour is documented
Activity
nc9 commentedon Oct 30, 2026
Thanks for the detailed report and the curl repro. Triaged: a default
Accept-Languagethat triggers locale redirects, plus content duplicate rules counting a redirected URL as its own page, are both worth fixing. Acceptance criteria added to the issue body; we will pick it up shortly.nik
fix(crawler,rules): no default Accept-Language; redirected pages are …
fix(rules,audit-engine): a redirected page is skipped only when its t…
fix(crawler,rules): no default Accept-Language; redirected pages are …
fix(rules,audit-engine): a redirected page is skipped only when its t…
nc9 commentedon Oct 30, 2026
Verified against main after v0.0.145. Met: criteria 1 to 4 (no default
Accept-Language, a configured header still works and is documented, redirected pages are counted once, and the e2e fixture covers both). Open: criterion 5 (cloud rendering): the docs state that a browser render uses its own language while the plain fetch sends none, but no test covers the render path without a default header. Leaving this open for that test.nik
nc9 commentedon Oct 31, 2026
Re-checked against main after v0.0.147. Criteria 1 to 4 stay met. Open: criterion 5 (cloud rendering): the docs state that a browser render uses its own language while the plain fetch sends none, but no test covers the render path without a default header and the hosted behaviour cannot be verified from this repo. Leaving this open for that.
nik
test(audit-engine): the cloud render submit carries no Accept-Languag…
nc9 commentedon Oct 31, 2026
Re-checked against main after v0.0.148 (a test now shows the cloud render request carries no Accept-Language). Criteria 1 to 4 stay met. Open: criterion 5: the client side is covered and documented, but what the hosted browser does cannot be verified from this repo, and a code comment in the test (a configured header cannot reach the render) disagrees with the dashboard docs (custom headers go to the cloud browser); those two need reconciling. Leaving this open for that.
nik
docs(crawler): say which render path an Accept-Language reaches, and …
docs(crawler): say which render path an Accept-Language reaches, and …
nc9 commentedon Nov 2, 2026
Verified on main (
e86767ff). No defaultAccept-Language:packages/crawler/src/fetcher.ts(comment and no header set) andpackages/crawler/src/core/crawler.ts(a configured one passes through). The last box:cloud-fetcher.test.tspasses 13/13, including the test that the render submit carries onlyurlsandtimeoutMsand no Accept-Language, with a plain and a configured fetch both returning 200.docs/configuration/crawler.mdxstates the default and the render behaviour. The mismatch I flagged earlier (test comment versus dashboard docs) is reconciled in014e196b: the comment and the docs now describe two different paths, the CLI render (no headers reach it) and the dashboard audit (website custom headers reach the cloud browser). What the hosted browser does is still not verifiable from this repo, and the docs say so. Fix commits:a44a6993,db6254ab,830028d7. All boxes ticked, closing.nik
nc9 commentedon Nov 2, 2026
Checked against main (e86767f). Ticked criterion 5; all five criteria are met. The fix landed in v0.0.145 (a44a699, db6254a), v0.0.148 (830028d) and v0.0.154 (014e196). Criterion 5:
packages/audit-engine/tests/cloud-fetcher.test.tsasserts a plain and a configured fetch both return 200 and that every render submit has exactly the keystimeoutMsandurls, with no Accept-Language; its comment anddocs/configuration/crawler.mdxnow say the same thing (the CLI render request has no header field; custom headers of a website in the dashboard reach the cloud browser on the hosted path, seedocs/dashboard/crawl-settings.mdxanddocs/cloud/firewall.mdx). What the hosted browser does itself is not verifiable from this repository. Tests run and passing: cloud-fetcher with rate-limited-coverage (20),audit-accept-language-1355-e2e(3),redirected-pages-not-duplicates-1355(12). Closing. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.154nik