Skip to content

Commit e418e90

Browse files
authored
fix(fix-request-body): make sure the content-type exists
1 parent 34468a1 commit e418e90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handlers/fix-request-body.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function fixRequestBody(proxyReq: ClientRequest, req: Request): void {
1717
proxyReq.write(bodyData);
1818
};
1919

20-
if (contentType.includes('application/json')) {
20+
if (contentType && contentType.includes('application/json')) {
2121
writeBody(JSON.stringify(req.body));
2222
}
2323

0 commit comments

Comments
 (0)