ss-mcp-proxy 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/index.mjs +7 -5
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -12,12 +12,14 @@ globalThis.fetch = async function (input, init) {
12
12
  return _fetch(input, init);
13
13
  }
14
14
 
15
- const proxy = new URL(PROXY_BASE);
16
- url.hostname = proxy.hostname;
17
- url.protocol = proxy.protocol;
18
- url.port = proxy.port;
15
+ // Strip leading /api from path so PROXY_BASE + path is correct
16
+ // e.g. /api/mcp/instructions → /mcp/instructions → PROXY_BASE + /mcp/instructions
17
+ const path = url.pathname.startsWith("/api/")
18
+ ? url.pathname.slice(4)
19
+ : url.pathname;
19
20
 
20
- return _fetch(url.toString(), init);
21
+ const proxyUrl = PROXY_BASE + path + url.search;
22
+ return _fetch(proxyUrl, init);
21
23
  };
22
24
 
23
25
  await import("shadcn-studio-mcp/build/index.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ss-mcp-proxy",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "description": "shadcn-studio MCP proxy wrapper",
6
6
  "license": "MIT",