Skip to content

Commit 8785d9f

Browse files
committed
Include headers when proxying post requests
1 parent 728c124 commit 8785d9f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

proxy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ exports.proxy = function(req, res, options, buffer){
6767
options.headers['content-length'] = req.headers['content-length'] || '0';
6868
}
6969

70+
if (options.method === 'POST') {
71+
if (!options.headers) {
72+
options.headers = {};
73+
}
74+
options.headers['content-type'] = req.headers['content-type'];
75+
}
76+
7077
options.agent = false;
7178

7279

0 commit comments

Comments
 (0)