Skip to content

fix: improve Markdown content negotiation - #5178

Open
lennessyy wants to merge 1 commit into
mainfrom
fix/markdown-content-negotiation
Open

fix: improve Markdown content negotiation#5178
lennessyy wants to merge 1 commit into
mainfrom
fix/markdown-content-negotiation

Conversation

@lennessyy

Copy link
Copy Markdown
Contributor

Summary

  • add Vary: Accept, Accept-Encoding to both negotiated Markdown and HTML responses
  • return a recoverable Markdown 404 with documentation links for missing Markdown routes

Validation

  • yarn build
  • node tests/run-all.mjs
  • vercel build --prod --yes

Copilot AI balanced review requested due to automatic review settings August 24, 2026 22:14
@lennessyy
lennessyy requested a review from a team as a code owner August 24, 2026 22:14
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
temporal-documentation Ready Ready Preview Aug 24, 2026 10:15pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

This PR does not change any pages in /docs. If you make updates, links to the modified pages will appear here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Markdown content negotiation headers and a recoverable Markdown 404 response.

Changes:

  • Adds Vary headers to negotiated responses.
  • Rewrites missing Markdown routes to a dedicated 404 endpoint.
  • Returns Markdown recovery links for missing pages.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
vercel.json Routes unmatched Markdown requests to the 404 endpoint.
middleware.js Adds negotiation-aware Vary headers.
api/markdown-not-found.js Implements the Markdown 404 response.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants