@decocms/runtime 1.0.0-alpha.30 → 1.0.0-alpha.31
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/package.json +2 -2
- package/src/index.ts +3 -0
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decocms/runtime",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@cloudflare/workers-types": "^4.20250617.0",
|
|
7
|
-
"@deco/mcp": "npm:@jsr/deco__mcp@0.
|
|
7
|
+
"@deco/mcp": "npm:@jsr/deco__mcp@0.7.8",
|
|
8
8
|
"@decocms/bindings": "1.0.1-alpha.17",
|
|
9
9
|
"@modelcontextprotocol/sdk": "1.20.2",
|
|
10
10
|
"@ai-sdk/provider": "^2.0.0",
|
package/src/index.ts
CHANGED
|
@@ -308,6 +308,9 @@ export const withRuntime = <TEnv, TSchema extends z.ZodTypeAny = never>(
|
|
|
308
308
|
|
|
309
309
|
// MCP endpoint
|
|
310
310
|
if (url.pathname === "/mcp") {
|
|
311
|
+
if (req.method === "GET") {
|
|
312
|
+
return new Response("Method not allowed", { status: 405 });
|
|
313
|
+
}
|
|
311
314
|
// If OAuth is configured, require authentication
|
|
312
315
|
if (oauthHandlers && !oauthHandlers.hasAuth(req)) {
|
|
313
316
|
// Clone request to check method without consuming the original body
|