File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 11[build ]
22publish = " public"
3-
4- [[redirects ]]
5- from = " /mcp"
6- to = " /"
7- status = 303
Original file line number Diff line number Diff line change @@ -96,6 +96,15 @@ function formatResponse(data: unknown): {
9696
9797// Netlify Edge Function Handler
9898export default async function handler ( req : Request ) {
99+ if ( req . method === "GET" ) {
100+ return new Response ( "Method Not Allowed" , {
101+ status : 405 ,
102+ headers : {
103+ "Content-Type" : "text/plain" ,
104+ Allow : "POST" ,
105+ } ,
106+ } ) ;
107+ }
99108 try {
100109 const { req : nodeReq , res : nodeRes } = toReqRes ( req ) ;
101110 const server = getServer ( ) ;
@@ -128,6 +137,6 @@ export default async function handler(req: Request) {
128137}
129138
130139export const config : Config = {
131- path : [ "/mcp" , "/" ] ,
132- method : [ "POST" ] ,
140+ path : [ "/mcp" ] ,
141+ method : [ "POST" , "GET" ] ,
133142} ;
You can’t perform that action at this time.
0 commit comments