Skip to content

soft-404 confirmation re-fetch can send custom request headers across a redirect to another origin #820

Closed

Description

@nc9

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.

Found while reviewing #816 (#807).

Acceptance Criteria

  • 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

  1. added
    bug
    P2
    size: S
    security
    and removed
    P2
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsecuritysize: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions