diff --git a/main.ts b/main.ts index 9988dd1..9a7138b 100644 --- a/main.ts +++ b/main.ts @@ -66,7 +66,7 @@ async function runSSE() { const url = new URL(req.url || "/", `http://${req.headers.host}`); if (req.method === "GET") { - const transport = new SSEServerTransport("/message", res); + const transport = new SSEServerTransport("/sse", res); const server = buildServer(); await server.connect(transport); @@ -77,7 +77,7 @@ async function runSSE() { return; } - if (req.method === "POST" && url.pathname === "/message") { + if (req.method === "POST" && url.pathname === "/sse") { const sessionId = url.searchParams.get("sessionId") || ""; const transport = transports.get(sessionId); if (!transport) {