Repository navigation
fix(cli-docs): Serve the browser install page as HTML - #2405
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the browser view of
/installon Git-built Vercel deployments. Browsers that request/installget rewritten to the highlighted source page, but the next route also setContent-Type: text/plainon that page, so the browser showed raw HTML source instead.Production (cli.sentry.dev, a prebuilt Craft deploy) currently serves
text/htmlhere, but the PR previews from thecliVercel project servetext/plain. That project is now linked to this repo. The route rule depended on how the deployment was built, so this change scopes thetext/plainheader to requests that don't accept HTML. That makes it correct for both kinds of deployment.curl,wget, andirmstill get the raw script astext/plain.Screenshots
Before (preview of current routes,
/installin a browser):After (preview of this branch):
via @BYK.
--
View Session [Sentry]