@automattic/mcp-wordpress-remote 0.2.14 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/proxy.js +2 -1
- package/package.json +1 -1
package/dist/proxy.js
CHANGED
|
@@ -38213,7 +38213,8 @@ function constructApiUrl(baseUrl, defaultEndpoint) {
|
|
|
38213
38213
|
try {
|
|
38214
38214
|
const urlObj = new URL(cleanUrl);
|
|
38215
38215
|
const hasCustomPath = urlObj.pathname && urlObj.pathname !== "/" && urlObj.pathname.length > 0;
|
|
38216
|
-
|
|
38216
|
+
const hasCustomQuery = urlObj.search && urlObj.search.length > 0;
|
|
38217
|
+
if (hasCustomPath || hasCustomQuery) {
|
|
38217
38218
|
return cleanUrl;
|
|
38218
38219
|
} else {
|
|
38219
38220
|
return new URL(`/?rest_route=${defaultEndpoint}`, cleanUrl).toString();
|