Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(js-sdk): Preserve path in baseUrl #10222

Merged
merged 7 commits into from
Nov 22, 2024
Merged

Conversation

kasperkristensen
Copy link
Contributor

What

  • Currently the js-sdk will discard the path in the baseUrl and only use the origin. As an example passing a baseUrl of "http://localhost:9000/custom/path", will result in only "http://localhost:9000" being used.
  • This PR preserves the path, so using sdk.admin.products() will make a request to "http://localhost:9000/custom/path/admin/products. For an explanation of when this might be useful see this issue: [Bug]: Admin Backend URL configuration not reflecting on app network #10190 (comment)

Resolves CMRC-740

@kasperkristensen kasperkristensen requested a review from a team as a code owner November 22, 2024 09:27
Copy link

vercel bot commented Nov 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 1:15pm
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Nov 22, 2024 1:15pm
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 22, 2024 1:15pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 22, 2024 1:15pm
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Nov 22, 2024 1:15pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 22, 2024 1:15pm
resources-docs ⬜️ Ignored (Inspect) Visit Preview Nov 22, 2024 1:15pm

Copy link

changeset-bot bot commented Nov 22, 2024

🦋 Changeset detected

Latest commit: 4caca54

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 65 packages
Name Type
@medusajs/js-sdk Patch
@medusajs/dashboard Patch
@medusajs/admin-bundler Patch
@medusajs/medusa Patch
@medusajs/test-utils Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/customer Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/core-flows Patch
@medusajs/framework Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/types Patch
@medusajs/utils Patch
@medusajs/workflows-sdk Patch
@medusajs/cli Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch
@medusajs/telemetry Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli Patch
integration-tests-http Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Admin Backend URL configuration not reflecting on app network
3 participants