mcp-remote 0.0.2 → 0.0.4
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.
|
@@ -295,7 +295,13 @@ async function findAvailablePort(preferredPort) {
|
|
|
295
295
|
async function parseCommandLineArgs(args, defaultPort, usage) {
|
|
296
296
|
const serverUrl = args[0];
|
|
297
297
|
const specifiedPort = args[1] ? parseInt(args[1]) : void 0;
|
|
298
|
-
if (!serverUrl
|
|
298
|
+
if (!serverUrl) {
|
|
299
|
+
console.error(usage);
|
|
300
|
+
process.exit(1);
|
|
301
|
+
}
|
|
302
|
+
const url = new URL(serverUrl);
|
|
303
|
+
const isLocalhost = url.hostname === "localhost" && url.protocol === "http:";
|
|
304
|
+
if (!(url.protocol == "https:" || isLocalhost)) {
|
|
299
305
|
console.error(usage);
|
|
300
306
|
process.exit(1);
|
|
301
307
|
}
|
package/dist/client.js
CHANGED
package/dist/proxy.js
CHANGED