fix: send RUM beacons to codeBasePath-relative /.rum instead of root - #242
Merged
Conversation
sampleRUM.collectBaseURL was set to bare window.origin, so rum-js always resolved the beacon endpoint to /.rum at the domain root regardless of where the site's code is deployed. Include codeBasePath so sites served from a subpath get their RUM requests routed to /codebasepath/.rum. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
shsteimer
marked this pull request as ready for review
August 25, 2026 15:49
trieloff
approved these changes
Aug 26, 2026
10 tasks
shsteimer
added a commit
that referenced
this pull request
Aug 27, 2026
* fix(test): update stale codeBasePath expectation in setup test PR #205 changed codeBasePath derivation to import.meta.url but left one assertion expecting the old DOM-based path. Co-Authored-By: Sean Steimer <ssteimer@adobe.com> * chore: rebuild dist dist/aem.js was stale relative to src changes in #205 and #242. Co-Authored-By: Sean Steimer <ssteimer@adobe.com>
trieloff
pushed a commit
that referenced
this pull request
Aug 27, 2026
## [3.1.8](v3.1.7...v3.1.8) (2026-08-27) ### Bug Fixes * derive codeBasePath from import.meta.url instead of DOM query ([#205](#205)) ([af0d5c2](af0d5c2)) * send RUM beacons to codeBasePath-relative /.rum instead of root ([#242](#242)) ([e9e4786](e9e4786)) * update stale setup test and rebuild dist ([#243](#243)) ([34fb1f9](34fb1f9)), closes [#205](#205) [#205](#205) [#242](#242)
Contributor
|
🎉 This PR is included in version 3.1.8 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
What changed
sampleRUM.collectBaseURLinsrc/setup.jsnow resolves toorigin + codeBasePath + '/'instead of barewindow.origin, so rum-js's beacon URL (built asnew URL('.rum/${weight}', collectBaseURL)) lands at/codebasepath/.rum/...for sites deployed under a subpath. Root-deployed sites are unaffected. Also removed thec8 ignoreoninit()and added a test covering the newcollectBaseURLvalue.Why
RUM requests were always sent to
/.rumat the domain root, even when the site's code base lives under a subpath — breaking setups where.rumis only proxied under that subpath.🤖 Generated with Claude Code