Skip to content

feat(loader): Use region-aware CDN host for Loader Script#17476

Open
sergical wants to merge 1 commit intomasterfrom
sergical/feat/loader-script-de-region
Open

feat(loader): Use region-aware CDN host for Loader Script#17476
sergical wants to merge 1 commit intomasterfrom
sergical/feat/loader-script-de-region

Conversation

@sergical
Copy link
Copy Markdown
Member

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 need js-de.sentry-cdn.com). This PR makes the host dynamic for signed-in users and adds a short alert for unauthenticated readers.

  • Add a new JS_SDK_LOADER_HOST code keyword on ProjectCodeKeywords, derived from the project's DSN host (.ingest.de.js-de.sentry-cdn.com, else js.sentry-cdn.com).
  • Swap the 5 loader <script> URLs in docs/platforms/javascript/common/install/loader.mdx to use ___JS_SDK_LOADER_HOST___.
  • Register SignedInCheck as an MDX component and wrap a small <Alert> above the loader snippets telling unauthenticated readers to swap to js-de.sentry-cdn.com if 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.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Apr 24, 2026 2:17pm
sentry-docs Ready Ready Preview, Comment Apr 24, 2026 2:17pm

Request Review

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