You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
soft-404 confirmation re-fetch can send custom request headers across a redirect to another origin #820
The soft-404 confirmation pass re-fetches candidate pages with the audit's custom request headers (crawler.headers, which can carry Authorization, cookies or an API key for a staging site) and native redirect: "follow" (packages/audit-engine/src/soft404-confirm.ts, defaultConfirmFetch). If a candidate page redirects to another origin, the headers can travel with the redirect to that origin.
The sitemap fetcher had the same problem and was fixed by following redirects by hand and dropping custom headers on a cross-origin hop (#1395, packages/crawler/src/sitemaps.ts). The confirmation fetch should get the same treatment, and should not follow a hop to an address the crawl's egress rules would refuse.
A soft-404 candidate on the audited site that redirects to another origin is re-fetched without any custom header on the cross-origin hop, proven by a test with two local origins that asserts the second origin receives none of the configured headers.
A same-origin redirect still carries the custom headers, so an authenticated staging audit confirms soft-404s as before.
A confirmation hop to a private, loopback or metadata address that the crawl would refuse is not followed.
Each existing soft-404 confirmation test still passes.
Activity
fix(engine): custom headers go to the audited origin and named hosts …
fix(engine): probes follow redirects by hand and custom headers stay …