From c5d846648304f2e36a172b25d9fb8300d8131f8c Mon Sep 17 00:00:00 2001 From: Aydin Date: Tue, 23 Jan 2018 12:40:08 +0100 Subject: [PATCH] Update common.js Add method parameter to options for overriding the proxy-outgoing HTTP-method --- lib/http-proxy/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http-proxy/common.js b/lib/http-proxy/common.js index b2f302c..6513e81 100644 --- a/lib/http-proxy/common.js +++ b/lib/http-proxy/common.js @@ -39,7 +39,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) { function(e) { outgoing[e] = options[forward || 'target'][e]; } ); - outgoing.method = req.method; + outgoing.method = options.method || req.method; outgoing.headers = extend({}, req.headers); if (options.headers){