We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa280be commit 6e75141Copy full SHA for 6e75141
2 files changed
.changeset/puny-meals-sniff.md
@@ -0,0 +1,5 @@
1
+---
2
+"mcp-handler": patch
3
4
+
5
+Add raw headers to incoming message
src/handler/mcp-api-handler.ts
@@ -870,6 +870,11 @@ function createFakeIncomingMessage(
870
req.method = method;
871
req.url = url;
872
req.headers = headers;
873
+ req.rawHeaders = Object.entries(headers).flatMap(([key, value]) =>
874
+ Array.isArray(value)
875
+ ? value.flatMap(v => [key, v])
876
+ : [key, value ?? ""]
877
+ );
878
879
const auth = options.auth || getAuthContext();
880
if (auth) {
0 commit comments