Skip to content

Commit b6e676c

Browse files
committed
fix: restrict stream route handling to GET requests
Made-with: Cursor
1 parent 705e494 commit b6e676c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import http from "node:http";
22
import { toSseChunks } from "./stream.js";
33

44
const server = http.createServer((req, res) => {
5-
if (req.url === "/stream") {
5+
if (req.url === "/stream" && req.method === "GET") {
66
res.writeHead(200, {
77
"Content-Type": "text/event-stream",
88
"Cache-Control": "no-cache",

0 commit comments

Comments
 (0)