feat(loader): Use region-aware CDN host for Loader Script#17476
Open
feat(loader): Use region-aware CDN host for Loader Script#17476
Conversation
The Loader Script snippet in the JavaScript install docs always pointed at js.sentry-cdn.com, which is incorrect for organizations hosted in the EU (which require js-de.sentry-cdn.com). Add a new JS_SDK_LOADER_HOST code keyword derived from the project's DSN host so signed-in users see the right URL for their selected project, and show an alert to unauthenticated readers noting the EU variant. Refs GH-17471 Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6 tasks
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.
DESCRIBE YOUR PR
The Loader Script snippet in the JavaScript install docs was hardcoded to
https://js.sentry-cdn.com/..., which is wrong for organizations hosted in the EU (they needjs-de.sentry-cdn.com). This PR makes the host dynamic for signed-in users and adds a short alert for unauthenticated readers.JS_SDK_LOADER_HOSTcode keyword onProjectCodeKeywords, derived from the project's DSN host (.ingest.de.→js-de.sentry-cdn.com, elsejs.sentry-cdn.com).<script>URLs indocs/platforms/javascript/common/install/loader.mdxto use___JS_SDK_LOADER_HOST___.SignedInCheckas an MDX component and wrap a small<Alert>above the loader snippets telling unauthenticated readers to swap tojs-de.sentry-cdn.comif their org is in the EU.Refs #17471
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: