Skip to content

Commit 0128b7e

Browse files
committed
Rollback unauthorized paths
Signed-off-by: Marcos Candeia <[email protected]>
1 parent 2fbb0d5 commit 0128b7e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

deno.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deco/mcp",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"exports": "./mod.ts",
55
"tasks": {
66
"check": "deno fmt && deno lint && deno check mod.ts"

mcp/server.ts

-4
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ function registerTools<TManifest extends AppManifest>(
282282
});
283283
}
284284

285-
const UNAUTHORIZED_PATHS = ["/live/release", "/.decofile"];
286285
const MESSAGES_ENDPOINT = "/mcp/messages";
287286
export function mcpServer<TManifest extends AppManifest>(
288287
deco: Deco<TManifest>,
@@ -347,9 +346,6 @@ export function mcpServer<TManifest extends AppManifest>(
347346
transport.close(); // Close the transport after handling the message
348347
return response;
349348
}
350-
if (UNAUTHORIZED_PATHS.some((p) => path.startsWith(p))) {
351-
return c.json({ error: "Unauthorized" }, 401);
352-
}
353349
await next();
354350
};
355351
}

0 commit comments

Comments
 (0)