Skip to content

Commit 7a61621

Browse files
Merge pull request #269 from guillermoscript/feature/mcp
fix: Forward the `content-length` header in the MCP API route.
2 parents 38d8f01 + 03c6bb2 commit 7a61621

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/api/mcp/[[...path]]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ async function proxyToMcp(request: NextRequest, subpath: string): Promise<Respon
213213
});
214214

215215
const headers = new Headers();
216-
for (const name of ['content-type', 'accept', 'authorization', 'x-tenant-id', 'x-forwarded-for', 'x-real-ip']) {
216+
for (const name of ['content-type', 'content-length', 'accept', 'authorization', 'x-tenant-id', 'x-forwarded-for', 'x-real-ip']) {
217217
const value = request.headers.get(name);
218218
if (value) headers.set(name, value);
219219
}

0 commit comments

Comments
 (0)