Skip to content

fix: preserve base path when constructing API URLs in GBContext#147

Open
vazarkevych wants to merge 1 commit into
growthbook:mainfrom
vazarkevych:fix/gb-context-url-methods
Open

fix: preserve base path when constructing API URLs in GBContext#147
vazarkevych wants to merge 1 commit into
growthbook:mainfrom
vazarkevych:fix/gb-context-url-methods

Conversation

@vazarkevych

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes a bug where getFeaturesURL and getRemoteEvalUrl would drop any sub-path from hostURL (e.g. https://something.com/some-other-path would produce https://something.com/api/... instead of https://something.com/some-other-path/api/...)
  • Extracted shared logic into a private _buildUrl helper to eliminate duplication
  • Added trailing slash normalization to handle multiple consecutive slashes in hostURL

@vazarkevych vazarkevych requested a review from madhuchavva March 20, 2026 21:03
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.

2 participants