Skip to content

feat: vary cache safe header for agent response#171

Merged
Kinfe123 merged 2 commits intomainfrom
feat/vary-cache-safe-response
May 9, 2026
Merged

feat: vary cache safe header for agent response#171
Kinfe123 merged 2 commits intomainfrom
feat/vary-cache-safe-response

Conversation

@Kinfe123
Copy link
Copy Markdown
Member

@Kinfe123 Kinfe123 commented May 9, 2026

  • feat: vary cache safe header for agent response
  • chore: docs

Summary by cubic

Add cache-safe Vary headers to docs markdown responses so CDNs cache HTML and agent markdown separately. Sets Vary to Accept or Accept, Signature-Agent for negotiated markdown, including 404s.

  • New Features
    • Added getDocsMarkdownVaryHeader to derive the correct Vary value from Accept and Signature-Agent.
    • Applied to markdown responses in astro, nuxt, svelte, tanstack-start, and the docs-api (200 and 404).
    • Omits Vary when no markdown negotiation occurs; sets Accept for Accept: text/markdown, and Accept, Signature-Agent when Signature-Agent is present.
    • Extended tests for Accept weighting and Signature-Agent; updated docs with CDN caching behavior and examples.

Written for commit 7db7ed8. Summary will update on new commits.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment May 9, 2026 0:55am

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 9, 2026

Open in StackBlitz

@farming-labs/astro

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro@171

@farming-labs/astro-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/astro-theme@171

@farming-labs/docs

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/docs@171

@farming-labs/theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/theme@171

@farming-labs/next

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/next@171

@farming-labs/nuxt

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt@171

@farming-labs/nuxt-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/nuxt-theme@171

@farming-labs/svelte

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte@171

@farming-labs/svelte-theme

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/svelte-theme@171

@farming-labs/tanstack-start

pnpm add https://pkg.pr.new/farming-labs/docs/@farming-labs/tanstack-start@171

commit: 7db7ed8

@Kinfe123 Kinfe123 merged commit 0fe1e4f into main May 9, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant