Skip to content

Commit 8e49d3e

Browse files
authored
Merge pull request #31 from Beyond-Better/staging
fix well-known protocol
2 parents 2de5450 + 4c6e92f commit 8e49d3e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

deno.jsonc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@beyondbetter/bb-mcp-server",
3-
"version": "0.1.18",
3+
"version": "0.1.19",
44
"description": "Comprehensive library for building Deno-based MCP servers",
55
"license": "MIT",
66
"copyright": "2025 - Beyond Better <charlie@beyondbetter.app>",
@@ -40,18 +40,18 @@
4040
"cleanup:orphaned-chunks:verbose": "deno run --allow-read --allow-write --allow-env scripts/cleanup-orphaned-chunks.ts --verbose"
4141
},
4242
"imports": {
43-
"mcp": "npm:@modelcontextprotocol/sdk@1.18.2",
44-
"mcp/client/": "npm:@modelcontextprotocol/sdk@1.18.2/client/",
45-
"mcp/client/index.js": "npm:@modelcontextprotocol/sdk@1.18.2/client/index.js",
46-
"mcp/client/auth.js": "npm:@modelcontextprotocol/sdk@1.18.2/client/auth.js",
47-
"mcp/client/stdio.js": "npm:@modelcontextprotocol/sdk@1.18.2/client/stdio.js",
48-
"mcp/client/streamableHttp.js": "npm:@modelcontextprotocol/sdk@1.18.2/client/streamableHttp.js",
49-
"mcp/server/index.js": "npm:@modelcontextprotocol/sdk@1.18.2/server/index.js",
50-
"mcp/server/stdio.js": "npm:@modelcontextprotocol/sdk@1.18.2/server/stdio.js",
51-
"mcp/server/streamableHttp.js": "npm:@modelcontextprotocol/sdk@1.18.2/server/streamableHttp.js",
52-
"mcp/shared/transport.js": "npm:@modelcontextprotocol/sdk@1.18.2/shared/transport.js",
53-
"mcp/shared/auth.js": "npm:@modelcontextprotocol/sdk@1.18.2/shared/auth.js",
54-
"mcp/types.js": "npm:@modelcontextprotocol/sdk@1.18.2/types.js",
43+
"mcp": "npm:@modelcontextprotocol/sdk@1.25.3",
44+
"mcp/client/": "npm:@modelcontextprotocol/sdk@1.25.3/client/",
45+
"mcp/client/index.js": "npm:@modelcontextprotocol/sdk@1.25.3/client/index.js",
46+
"mcp/client/auth.js": "npm:@modelcontextprotocol/sdk@1.25.3/client/auth.js",
47+
"mcp/client/stdio.js": "npm:@modelcontextprotocol/sdk@1.25.3/client/stdio.js",
48+
"mcp/client/streamableHttp.js": "npm:@modelcontextprotocol/sdk@1.25.3/client/streamableHttp.js",
49+
"mcp/server/index.js": "npm:@modelcontextprotocol/sdk@1.25.3/server/index.js",
50+
"mcp/server/stdio.js": "npm:@modelcontextprotocol/sdk@1.25.3/server/stdio.js",
51+
"mcp/server/streamableHttp.js": "npm:@modelcontextprotocol/sdk@1.25.3/server/streamableHttp.js",
52+
"mcp/shared/transport.js": "npm:@modelcontextprotocol/sdk@1.25.3/shared/transport.js",
53+
"mcp/shared/auth.js": "npm:@modelcontextprotocol/sdk@1.25.3/shared/auth.js",
54+
"mcp/types.js": "npm:@modelcontextprotocol/sdk@1.25.3/types.js",
5555
"json-schema": "https://esm.sh/v135/@types/json-schema@7.0.15/index.d.ts",
5656
"zod": "npm:zod@^3.22.4",
5757
"zod-to-json-schema": "npm:zod-to-json-schema@^3.24.6",

src/lib/utils/UrlUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ export function reconstructOriginalUrl(request: Request): URL {
2424
// Parse the current URL to get path and query parameters
2525
const currentUrl = new URL(request.url);
2626

27+
//console.log('reconstructOriginalUrl', { forwardedProto, currentUrlProto: currentUrl.protocol});
2728
// Reconstruct with proper protocol and host
28-
const protocol = `${forwardedProto}:` || currentUrl.protocol;
29+
const protocol = forwardedProto ? `${forwardedProto}:` : currentUrl.protocol;
2930
const host = forwardedHost || currentUrl.host;
3031

3132
const reconstructedUrl = new URL(
3233
`${protocol}//${host}${currentUrl.pathname}${currentUrl.search}${currentUrl.hash}`,
3334
);
35+
//console.log('reconstructOriginalUrl', { reconstructedUrl});
3436

3537
return reconstructedUrl;
3638
}

0 commit comments

Comments
 (0)