fix(js-sdk): Preserve path in baseUrl (#10222)
**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: https://github.com/medusajs/medusa/issues/10190#issuecomment-2492974845 Resolves CMRC-740
This commit is contained in:
committed by
GitHub
parent
60b13c191e
commit
d6ff8d7aa1
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/js-sdk": patch
|
||||
---
|
||||
|
||||
fix(js-sdk): Preserve path in baseUrl
|
||||
Reference in New Issue
Block a user