mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-11-02 02:19:43 +00:00
Disable proxy buffering for MCP SSE
Add X-Accel-Buffering: no headers to prevent Nginx/Dokploy from buffering SSE streams
This commit is contained in:
1 parent
3c9a021f11
commit
b2925daf4f
1 file changed
+6
-1
@@ -16,7 +16,12 @@ const mcpServer = createMcpServer();
|
|||||||
|
|
||||||
// Mount MCP server
|
// Mount MCP server
|
||||||
app.all('/mcp', async (c) => {
|
app.all('/mcp', async (c) => {
|
||||||
return mcpServer.handleRequest(c);
|
// Add headers to prevent Nginx/proxy buffering for SSE
|
||||||
|
c.header('X-Accel-Buffering', 'no');
|
||||||
|
c.header('Cache-Control', 'no-cache');
|
||||||
|
c.header('Connection', 'keep-alive');
|
||||||
|
|
||||||
|
return mcpServer.handleRequest(c.req.raw);
|
||||||
});
|
});
|
||||||
|
|
||||||
const port = Number(process.env.PORT) || 3000;
|
const port = Number(process.env.PORT) || 3000;
|
||||||
|
|||||||
Reference in new issue
Block a user