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
custom -H user-agent: five probe-style requests still send the built-in agent #1152
With -H "user-agent: X" (or accept style custom headers) a handful of probe-style requests per run still go out with squirrel's own browser-like agent string instead of X. The docs name only two deliberate exceptions (the AI-agent-access probe and the cloaking Googlebot fetch), so these five are surprises for a site owner who allowlists or logs by the agent they set.
Observed
Local server logging method and User-Agent, audit of a 3-page site, squirrel audit http://127.0.0.1:<port>/ -m 3 --http --offline --no-publish -f json -H "user-agent: UAPROBE/1.0", isolated squirrel home, current main. Every request carried UAPROBE/1.0 except five, which carried a random sticky browser string (an iPhone Safari string in this run, drawn by resolveStickyUserAgent when [crawler] user_agent is empty):
GET / with Accept: */* (twice)
GET / with Accept: text/html,*/*
HEAD / with Accept: */*
HEAD /<a linked page> with Accept: */*
The crawl, the sitemap and discovery probes, resources (CSS, JS, images) and robots.txt all sent UAPROBE/1.0.
Likely cause
The -H value is merged into request headers, but config.crawler.user_agent stays empty, so code that reads the agent from crawl.config.userAgent (packages/audit-engine/src/adapter.ts, the probeUserAgent and userAgent: options around lines 1157, 2119 and 2922, feeding link-target-probe.ts, soft404-confirm.ts and the root checks) gets the sticky random one. Needs one probe-by-probe confirmation: which of these five is which check.
Expected
Either each of those probes sends the custom User-Agent (the same rule the crawl and the resource checker already follow), or the docs name each remaining exception and why.
Acceptance Criteria
The probes behind the five requests above are identified in the issue or PR
With -H "user-agent: X", those probes send X, or each remaining exception is listed on docs/configuration/crawler.mdx with its reason
A test (or the local server repro in the PR) shows no request outside the documented exceptions carries a different agent
Activity
fix(cli): a custom user-agent header is the agent of the probes that …
fix(cli): a custom user-agent header is the agent of the probes that …