@papi-ai/server 0.7.8 → 0.7.9
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/dist/index.js +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22587,6 +22587,13 @@ If you already have an account, check that both **PAPI_PROJECT_ID** and **PAPI_D
|
|
|
22587
22587
|
}
|
|
22588
22588
|
}
|
|
22589
22589
|
if (req.url === "/mcp" || req.url === "/sse") {
|
|
22590
|
+
req.headers["accept"] = "application/json, text/event-stream";
|
|
22591
|
+
const acceptIdx = req.rawHeaders.findIndex((h) => h.toLowerCase() === "accept");
|
|
22592
|
+
if (acceptIdx >= 0) {
|
|
22593
|
+
req.rawHeaders[acceptIdx + 1] = "application/json, text/event-stream";
|
|
22594
|
+
} else {
|
|
22595
|
+
req.rawHeaders.push("Accept", "application/json, text/event-stream");
|
|
22596
|
+
}
|
|
22590
22597
|
if (req.method === "POST") {
|
|
22591
22598
|
const chunks = [];
|
|
22592
22599
|
req.on("data", (chunk) => chunks.push(chunk));
|
package/package.json
CHANGED