Fix: Negotiated responses carry Vary Accept

Web-audit fix skill for the markdown-vary check (Content for agents, SHOULD).

Goal

Name every negotiated request header in Vary so shared caches never serve one client the wrong variant.

Fix

When the same URL serves HTML or markdown depending on the request, emit a Vary header on every response that names each request header the choice depends on: Vary: Accept when you negotiate on Accept alone, and Vary: Accept, User-Agent when agent User-Agents also receive the markdown twin. Without it a shared cache (a CDN or a corporate proxy) can store the markdown twin under the bare URL and then hand it to a browser, or the reverse. If the CDN ignores or strips Vary (Cloudflare's zone cache historically keeps only Accept-Encoding), do not give that cache a long s-maxage on negotiated responses: HIT replies would then reach clients with no Vary, and the check still fails.

Resources

Copy-paste prompt

Paste this into your coding agent. Your audit adds what it observed for this check:

Verify

Re-run the audit at https://anc.dev/audit or call the audit_website MCP tool; the markdown-vary check should report pass.