Skip to content

fix(cli-docs): Serve the browser install page as HTML - #2405

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
junior/cli-docs-browser-content-type
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
junior/cli-docs-browser-content-type

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the browser view of /install on Git-built Vercel deployments. Browsers that request /install get rewritten to the highlighted source page, but the next route also set Content-Type: text/plain on that page, so the browser showed raw HTML source instead.

Production (cli.sentry.dev, a prebuilt Craft deploy) currently serves text/html here, but the PR previews from the cli Vercel project serve text/plain. That project is now linked to this repo. The route rule depended on how the deployment was built, so this change scopes the text/plain header to requests that don't accept HTML. That makes it correct for both kinds of deployment. curl, wget, and irm still get the raw script as text/plain.

Screenshots

Before (preview of current routes, /install in a browser):

before

After (preview of this branch):

after

via @BYK.

--

View Session [Sentry]

The route that marks /install as text/plain also matched browser requests
after they were rewritten to the highlighted source page, so Git-built
preview deployments served that page as plain text. Skip it for requests
that accept HTML.

Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Nov 18, 2026 9:50pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 18, 2026 9:50pm UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 18, 2026 22:00
@sentry-junior
sentry-junior Bot requested a review from BYK November 18, 2026 22:00
@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 18, 2026

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – cli — 53c4c799 Deployed Nov 18, 2026 by vercel[bot]
Preview – sentry-local — 53c4c799 Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant