@wrongstack/mcp 1.1.1 → 1.1.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.
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7805,6 +7805,7 @@ var MCPRegistry = class extends MCPRegistryRuntime {
|
|
|
7805
7805
|
// src/server-http.ts
|
|
7806
7806
|
import { timingSafeEqual as timingSafeEqual2 } from "node:crypto";
|
|
7807
7807
|
import { createServer as createServer2 } from "node:http";
|
|
7808
|
+
import { isIP as isIP3 } from "node:net";
|
|
7808
7809
|
import { toErrorMessage as toErrorMessage5 } from "@wrongstack/core/utils";
|
|
7809
7810
|
|
|
7810
7811
|
// src/server-stdio.ts
|
|
@@ -8036,7 +8037,7 @@ async function handleHttpRequest(server, req, res, token, log, boundHost) {
|
|
|
8036
8037
|
}
|
|
8037
8038
|
function isLoopbackHostname(hostname2) {
|
|
8038
8039
|
const bare = hostname2.toLowerCase().replace(/^\[(.*)\]$/, "$1");
|
|
8039
|
-
return bare === "localhost" || bare === "::1" || bare ===
|
|
8040
|
+
return bare === "localhost" || bare === "::1" || isIP3(bare) === 4 && bare.startsWith("127.");
|
|
8040
8041
|
}
|
|
8041
8042
|
function originIsAcceptable(req, boundHost) {
|
|
8042
8043
|
const origin = req.headers.origin;
|